SUM OF ALL VALUES FROM 1 - 5


#include<stdio.h>
#include<conio.h>
void main()
{
int i,s=0;
i=1;
while(i<=5)
  {
  s=s+i;
  i++;
  }
printf("Sum=%d",s);
getch();
}

0 comments: (+add yours?)

Post a Comment