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
What is the right way to use errno?
What is #error and use of it?
Explain how are 16- and 32-bit numbers stored?
What does node * mean?
Do you know the use of 'auto' keyword?
What are the rules for the identifier?
What is the function of this pointer?
When is a null pointer used?
What is the difference between fread and fwrite function?
How will you write a code for accessing the length of an array without assigning it to another variable?
What is sizeof return in c?
I need testPalindrome and removeSpace
#include
What is pointer to pointer in c language?
Is it possible to pass an entire structure to functions?
provide an example of the Group by clause, when would you use this clause