0

Sum of first 4 number?

add the first 4 number using c language

18th Mar 2018, 2:07 PM
Subhadip Saha
Subhadip Saha - avatar
2 Respostas
+ 1
int main() { int sum=0,n; for(n=1;n<=4;n++){ sum+=n; } printf ("sum of first 4 no: %d",sum); return 0; }
18th Mar 2018, 2:21 PM
Manorama
Manorama - avatar
+ 1
thanks
18th Mar 2018, 2:23 PM
Subhadip Saha
Subhadip Saha - avatar