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 / chirag

#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 ?    30 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a loop?

1064


What is the symbol indicated the c-preprocessor?

1254


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1925


What is NULL pointer?

1107


What is identifiers in c with examples?

1184


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

16020


Why c is a mother language?

1042


How to write a multi-statement macro?

1050


Write a program for Overriding.

1163


Explain how do you convert strings to numbers in c?

1082


will u please send me the placement papers to my mail???????????????????

1840


What is output redirection?

1225


Explain what standard functions are available to manipulate strings?

1080


how to introdu5ce my self in serco

2008


How can I call fortran?

1049