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

#include<stdio.h>
main()
{
int n,n1,n4,z;
printf("Enter 4 digit number:");
scanf("%d",&n);
n4=n%10;
n1=n/1000;
z=n1+n4;
printf("Result=%d",z);
system("pause");
}

Is This Answer Correct ?    11 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

‎How to define structures? · ‎

1103


What does s c mean on snapchat?

1122


What is structure padding and packing in c?

1079


Who invented bcpl language?

1203


What is a union?

1044


Describe the order of precedence with regards to operators in C.

1051


how to find binary of number?

4462


Explain how can a program be made to print the line number where an error occurs?

1226


Are pointers really faster than arrays?

1040


Explain About fork()?

1124


what is the diffrenet bettwen HTTP and internet protocol

1844


Why does not c have an exponentiation operator?

1062


What are the 4 types of programming language?

1137


How can you find the exact size of a data type in c?

1006


Explain the difference between ++u and u++?

1144