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 / nikita singh

#include<stdio.h>
#include<conio.h>
void main()
{
int num,a,b,sum;
clrscr();
printf("enter a four digit no");
scanf("%d",&num);
a=num%10;
b=num/1000;
sum=a+b;
printf("sum is =%d",sum);
getch();
}

Is This Answer Correct ?    24 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Distinguish between actual and formal arguments.

1126


Explain bitwise shift operators?

1316


What is #error and use of it?

1346


How can I recover the file name given an open stream?

1080


What is c language and why we use it?

1118


What is gets() function?

1189


What is a good way to implement complex numbers in c?

1089


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2431


What is the advantage of a random access file?

1253


What is a memory leak? How to avoid it?

1422


What is ambagious result in C? explain with an example.

2695


What is a structural principle?

1241


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

2144


What is the explanation for prototype function in c?

1032


Differentiate between functions getch() and getche().

1108