Answer Posted / sarthak patwal
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c,d;
printf ("Enter the number");
scanf ("%d",a);
b=a%10;
c=a/10;
d=b+c;
printf ("The sum of digits is %d",d);
getch();
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Write a program to reverse a string.
What is c mainly used for?
How can I find out the size of a file, prior to reading it in?
What are 3 types of structures?
What is the use of function in c?
What is a macro in c preprocessor?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What are the advantages of c preprocessor?
what is reason of your company position's in india no. 1.
What is exit() function?
Can a pointer be static?
how logic is used
What is storage class?
Can the curly brackets { } be used to enclose a single line of code?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?