Programming and IT Research Center (ج البرمجة وتكنولوجيا المعلومات مركز الأبحاث)
widgets
Tuesday, July 2, 2013
Pattern in C
Print Pattern in C
Print the following Pattern
56789
5678
567
56
5
#include <stdio.h>
int main()
{
int i, j;
for(i=9;i>=5;i--)
{
for(j=5;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment