write a program to accept 2 numbers from user calculate sum
of each digit,reverse the orignal number and display
Answer Posted / amol
Void main()
{
Int x,y
Cout<<”enter two nos”
Cin>>x>>y;
Cout<<”Menu”<<endl;
Cout<<” 1. Addition 2. Subtraction 3. Multiplication 4.
Swapping the values 5. Reverse order”;
Cin>>c;
Switch(c)
{
Case 1: sum=x+y
Cout<<sum;
Case 2: sub=x-y;
Cout<<sub;
Case 3: pro=x*y;
Cout<<pro;
Case 4:swap=x;
x=y;
y=swap;
cout<<x<<y;
case 5: while(x/10!=0)
{
n++;
}
For(i=1;i<=n;i++)
{
Cout<<”reversed x=”;
r=x%10;
Cout<<r
x=x/10;
}
while(y/10!=0)
{
n++;
}
For(i=1;i<=n;i++)
{
Cout<<”reversed y=”;
r=y%10;
Cout<<r
y=y/10;
}
Default: break;
}
Getch();
}
| Is This Answer Correct ? | 8 Yes | 10 No |
Post New Answer View All Answers
4. What is your typical way of dealing with conflict?
what is debugging?
minimum percentage in B.E in(INFORMATION TECHNOLOGY) to be eligible for IES exam qualification and also for reserved categories.are IT engineers are eligible for giving IES exams? please reply soon.
how to store the vacuum in tank? its possible? what are the units for measure the vacuum ?
different types of protocols.......?
is the RKDF university is aicte approved for b.tech in computer
Give the coding for system reboot in C
Can main() function can be made virtual?
what is your experience with computer-aided design software.
How Main()is called by opreting system?
Hi Friends, I am doing engg in comp sc in the final year from the evening college, I don't have experience in technical field. I am working in nontechnical field. I have big question that will IT companies considered me as fresher or they looks experience from me ? if you reply to my query, i am really grateful to you
explain software engineering practices
why every computer should have a boot strap routine?
What is the instruction to load the register B?
why is it unable to download call letter of cusat 2008?