Search For

Floyds Triangle

Flag Hide Line Nos
This is snippet is Flagged for some reasons !!!
#include <stdio.h>
void main()
  int n, i,  c, a = 1;
  printf("Enter the number of rows of Floyd's triangle to print\n");
  scanf("%d", &n);
 for (i = 1; i <= n; i++)
    for (c = 1; c <= i; c++)
      printf("%d ",a);

Vote! You feel this code is working like charm ? Go a head Login and Press up arrow.
Didn't work ?, press down arrow and let us know the error in comments