Sunday, 29 April 2018

Program to calculate addition of five numbers in c

/* addition of five number*/
# include <stdio.h>
void main ()
{
int i=0,a ;
int sum =0 ;
clrscr () ;
while ( i < 5 )
{
printf ("/n enter a number :") ;
scanf ("%d", & a) ;
sum =sum+a ;
i++ ;
}
printf ("/n sum =%d",sum) ;
getch () ;
}

No comments:

Post a Comment

Featured post

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...