*Just some basic programmes
, suggest me something to improve.
Subscribe for more such posts..
Dear Reader... I hope u are like my posts. If so then please don't forget to like , share and follow my blog for more such posts ,also feel free to write suggestions in the comment box given over here.
Thank you...
Search This Blog
C program to print Floyds Triangle.
#include <stdio.h>
int main()
{ int n , j = 1, i = 1, value = 1 ;
printf("Enter n value : ");
scanf("%d" , &n);
for (i = 1 ; i <= n ; i++)
{
for(j = 1 ; j <= i ; ++j)
{
printf("%d " , value);
++value ;
}
printf("\n");
}
return 0 ;
}
No comments:
Post a Comment