Hi, welcome to my website Programming.OM. My name is Om prakash kartik. This blog helps you to learn programming languages concepts and technique.
#include<stdio.h> #include<conio.h> int main() { int i,j,sum=0; for(i=1;i<=5;i++) { for(sum=0,j=1;j<=i;j++) { sum+=j; if(j!=i) printf("%d + ",j); else printf("%d = ",j); } printf("%d",sum); printf("\n"); } getch(); }
0 Comments