how to find sum of 5 digits in C?

Answer Posted / rohit

#include<stdio.h>
int main()
{
int n,sum=0;
printf("enter number");
scanf("%d".&n);
for(int i=0;i<5;i++)
{
sum=sum+n;
}
printf("sum is %d",sum);
return 0;
}

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the properties of union in c?

591


What is the difference between local variable and global variable in c?

692


What is string length in c?

615


What does the c preprocessor do?

624


Why we use int main and void main?

537






When was c language developed?

704


What is c programming structure?

621


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

2861


An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

688


Can you assign a different address to an array tag?

703


What is a global variable in c?

591


What do you mean by invalid pointer arithmetic?

637


What's the difference between constant char *p and char * constant p?

659


What is the full form of getch?

585


What is graph in c?

585