write a program for input is 56 output will be 5+6=10?

Answers were Sorted based on User's Feedback



write a program for input is 56 output will be 5+6=10?..

Answer / mani kandan.s

#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,b;
clrscr();
printf("Enter the n value");
scanf("%d",&n);
a=n%10;
b=n/10;
printf("Result is=%d",a+b);
getch();
}

Is This Answer Correct ?    14 Yes 3 No

write a program for input is 56 output will be 5+6=10?..

Answer / 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

More Engineering AllOther Interview Questions

Please send us a brief description why do you think you can fit to the role

0 Answers   npcc,


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?

0 Answers  


sir now i am studying B.Tech final year so now i am eligible for writing group 1 and 2 or not?

0 Answers  


why we use conio.h in c programming?

0 Answers   TCS,


what things abutsbi

0 Answers   State Bank Of India SBI,






what are the efficient way or solutions to avoid ABEND=S04C.

0 Answers  


can any one give 10 ways to create a file in unix...???? through command prompt....

0 Answers  


Can have i call constructor in interface?

0 Answers  


Index of an Array containing 'n' aliment varies from________to_______

0 Answers  


hi friends i am b-tech in computer science having interview of State bank of india clerk day on 30 th april. I want to know the answer of question:"you r B.tech in C.S. why do u want to become a bank clerk?" please help.Its my humble request.

0 Answers   State Bank Of India SBI,


what the bridge id of any switches

0 Answers  


Client server applications

0 Answers   TCS,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4452)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)