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

Is c a great language, or what?

1168


What are the two types of functions in c?

1059


How can a string be converted to a number?

1070


How main function is called in c?

1169


application attempts to perform an operation?

2038


How to find a missed value, if you want to store 100 values in a 99 sized array?

1466


Why header file is used in c?

1164


Sir i need notes for structure,functions,pointers in c language can you help me please

2463


Explain continue keyword in c

1068


How are variables declared in c?

1151


What is a structure in c language. how to initialise a structure in c?

1123


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2187


What is the difference between variable declaration and variable definition in c?

1108


Write a program for Overriding.

1214


What is a dynamic array in c?

1228