Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to accept 2 numbers from user calculate sum
of each digit,reverse the orignal number and display

Answer Posted / raja mansoor

#include<stdio.h>
#include<conio.h>
Void main ()
{
Int x, y;
Printf (”Enter two numbers”);
Scanf (“%d %d, &x, y);
1. Addition
2. Subtraction
3. Multiplication
4. Swapping the values
5. Reverse order”;
Getche () ==c;
Switch(c)
{
Case 1: sum=x+y
Printf (“%d”, sum);
Case 2: sub=x-y;
Printf (“%d”, sub);
Case 3: pro=x*y;
Printf (“%d”, pro);
Case 4: swap=x;
Printf (“%d”, x=y);
y=swap;
Printf (“%d %d”, x, y);
Case 5: while(x/10! =0)
{
N++;
}
For (i=1; i<=n; i++)
{
Printf (”Reversed of x is %d=”);
r=x%10;
Printf (“%d”, r);
x=x/10;
}
While(y/10! =0)
{
N++;
}
For (i=1; i<=n; i++)
{
Printf (”Reversed of y is %d=”);
r=y%10;
Printf (“%d”, r);


]
y=y/10;
}
Default: break;
}
Getch ();
}

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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.

2320


what are the artifacts in coding phase in SDLC????

2158


Why the secondary ip address of interface is not advertising in IGP cloud?

4559


what is the different between view and materialized view in oracle DBA?

1638


sir i m reject two time in u.s in spring intake now im taking a date of 1july-2010 in fall intake &im competed my bachlor degree(chem) in jun-2009 so what answer i give to visa officer ask me a what r u doing last 1-year bcoz i have no work expirience

1695


what is the need for oobs

2135


what is your experience in developing technical specifications?

2057


write a program for reverse a given string?

1997


why does the array will be start on size 0?

1990


what is a Additional domain ? what is a child domain?

2854


What would be your first invention?

1102


1)How to calculate AC Capacity for the Room?

2199


How would you design a gravity dam for holding back water?

1079


hi,i came to US to pursue my masters in computer information technology.Can i do my masters the first 6months in US and the rest 9 months course from INDIA through online education

1740


Which software model is best suited for the Maintenance kind of project?

2622