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

What is OHNS Material and can anybody explain the Chemical & Physical Properties of Same. Which Technical Standard Book shows this Specification. Why can't we use En series instead of OHNS. Where it is specifically Used.

3 Answers   Advanced Bolting Solutions,


Hai, I want System Egnineer/Administrator interview question/answers.

0 Answers   Patni, Wipro,


Why do sausages split lengthways, rather than around the circumference?

0 Answers  


real time examples for basic concepts in oop

0 Answers   Wipro,


Briefly describe your ideal job?

0 Answers  






How we can read an Image in VC++?How we can find out the intensities of the pixels of an image and dimension of the image?

0 Answers   CEERI,


What Are Choosed Seminar's Best Topic..? What Are Dezined Software...?

0 Answers  


Why is using C language

0 Answers   IOCL,


what are differences between composition and inheritance in c

0 Answers  


What is the reason of hunting of variable turbine geometry?

2 Answers  


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.

0 Answers  


as we know that java is a platform independent language, but we need jvm for the same operating system why?

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • 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)