Advertisement

1+ 5+ 9+ ........+50


1+ 5+ 9+ ........+50

 
#include<stdio.h>
#include<conio.h>
void main()
{
int i,s;
s=0;
for(i=1;i<=50;i=i+4)
{
s=s+i;
}
printf(“Result=%d”,s);
getch();
}

No comments:

Post a Comment

Please comment bellow. Share your knowledge