write a program for input is 56 output will be 5+6=10?
Answer Posted / saranya
#include<stdio.h>
#include<conio.h>
main()
{
int n,a,b=0;
clrscr();
printf("Enter the n value");
scanf("%d",&n);
while(n!=0)
{
a=n%10;
b=b+a;
n=n/10;
}
printf("Result is %d",b);
getch();
}
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Explain the concept of segmentaion.
Write a nonrecursive routine to reverse a singly linked list in O(N) time.
describe how your code can determine if the user entered an input box value or click the cancel button?
what is mean by tranducer
What are the main differences between the engines in jet fighters and the engines in jet airliners; which type of engine is the more efficient, and (qualitatively) why?
is there any better model than jcb 3dx
how to find out the name of the users who are currently working starting with the same characters in unix os
what is the stucture of.net array?
hai,am a marine engineer..pls anyone tell me what is the abbrevation for "gfca" in Mitsui B&w 7l67gfca engine.my mail id is kamaraj_mech@yahoo.co.in
NIC question paper
what is the difference between error,exception,bug,defect,fault..?
WHAT IS THE PROPER LOCATION OF SAMPLE POINT OF LPG SPHERE TANK?
what is the number of water, sand and cement required for moulding brick?
What is the procedure for taking leave while detecting Epf and Esi?
to acheve the IP 65 protection class does it is mandatory to apply silicon grease?