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
How to define structures? ·
What does s c mean on snapchat?
What is structure padding and packing in c?
Who invented bcpl language?
What is a union?
Describe the order of precedence with regards to operators in C.
how to find binary of number?
Explain how can a program be made to print the line number where an error occurs?
Are pointers really faster than arrays?
Explain About fork()?
what is the diffrenet bettwen HTTP and internet protocol
Why does not c have an exponentiation operator?
What are the 4 types of programming language?
How can you find the exact size of a data type in c?
Explain the difference between ++u and u++?