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

How old is c programming language?

1006


How do you print an address?

1265


What are compound statements?

1171


What is a structural principle?

1161


why we wont use '&' sing in aceesing the string using scanf

2368


What is the difference between a string and an array?

1198


Implement bit Array in C.

1138


What are operators in c?

1022


a c code by using memory allocation for add ,multiply of sprase matrixes

2792


What is difference between function overloading and operator overloading?

1083


How to explain the final year project as a fresher please answer with sample project

975


How do I use strcmp?

1073


Explain why C language is procedural?

1219


In a header file whether functions are declared or defined?

1126


What is a stream water?

1209