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


Please Help Members By Posting Answers For Below Questions

Briefly describe your ideal job?

3353


How does an aeroplane stay airborne and how can some aeroplanes fly upside down?

589


synchronous and asynchronous transmission

1484


what is software engineer

1601


Define function ? Explain arguments in functions ?

1528






I have Cleared Bank of India Clerical Examination.I just want to know how to prepare for interview and what are the parriculars that I have to submit......Pls someone help me with it

1491


Explain what are db_options used for?

1405


i want techical questions on c and java with code part

1431


iam from engineering information technology ... can i write group 1 exams??

1677


I have got one problem .I initially have got windows vista in my computer but now I installed linux UBUNTU operating system into my computer .For this i first format D: drive and got installed finely there and restart , when it boots there there were two options vista and ubuntu .But the problem is that when i choose vista it opens but screen seems to be dark only mouse pointer sees in the screen and no more windows appeared . But when i choose ubuntu it opens and asks for username and password .But i don't know these things. But linux is freeopen software , why it asks userename and password ? Now i am unable to use my computer ,i installed lunux without partioning the drive. Plz give me the solution The computer configuration of my computer is 80 GB harddisk, 1 GB RAM.3GHz speed.

1402


2. A product selected for testing is equally likely to have been produced by one the 6 machines/processes. (i) Determine sample space ā€˜Sā€™ (ii) What is the probability that the product is from machine 1? (iii) What is the probability that the product is from machine 2 or machine 4? (iv) What is the probability that the product is from both machine 5 and machine 3? (v) What is the probability that the product is not from machine 6? (vi) What is the probability that the product is not from either machine 6 or machine 1?

1521


Hi i'm richa piplani applied for ATC(IT) if u have the syllabus & old question papers forward me.I will be very much thankful to you. piplani.richa@gmail.com and sonu_pips@yahoo.co.in

1597


How many codes are used when u design a Pressure Vessel

1363


PREVIOUS AND NEW companies positive and negative points AFTER LIVING

1670


what is the difference between verification and validation

2330