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...

If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.

Answer Posted / sourav sinha

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int num,n1,n2,sum;
clrscr();
printf("Enter 4 digit number:");
scanf("%d",&num);
n1=num/1000;
n2=num%10;
sum=n1+n2;
printf("Sum of 1st & 4th digit number is=%d",sum);
getch();
}
enjoy!!!!!!!!!!!!

any program just mail me:
ssmartinp@gmail.com

Is This Answer Correct ?    57 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can two or more operators such as and be combined in a single line of program code?

1422


Is c compiled or interpreted?

1250


Which function in C can be used to append a string to another string?

1275


What is a program?

1341


What do you mean by scope of a variable in c?

1059


Which is best linux os?

1082


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1981


How do you define CONSTANT in C?

1368


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

1056


Why we write conio h in c?

1080


What is the role of this pointer?

1130


What are the types of i/o functions?

1421


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1310


Why c is called a mid level programming language?

1113


write a program to generate address labels using structures?

4625