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

#include<stdio.h>
main()
{
int n,n1,n4;
printf("Enter 4 digit number:");
scanf("%d",&n);
n4=n%10;
n1=n/100;
printf("\nResult=",(n1+n4));
getch();
}

Is This Answer Correct ?    52 Yes 55 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to build a exercise findig min number of e heap with list imlemented?

2017


hi, which software companys will take,if d candidate's % is jst 55%?

2045


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

992


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1170


How do you define CONSTANT in C?

1208


List the variables are used for writing doubly linked list program.

1965


How can you read a directory in a C program?

1091


Why doesnt long int work?

975


Which is more efficient, a switch statement or an if else chain?

966


What does nil mean in c?

1176


What is 1d array in c?

1028


Difference between Function to pointer and pointer to function

1015


What is function prototype in c language?

981


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1012


What is a keyword?

1119