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
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Is multithreading possible in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is #define size in c?
How arrays can be passed to a user defined function
Why c is called procedure oriented language?
What is quick sort in c?
Write a function that will take in a phone number and output all possible alphabetical combinations
Can we replace the struct function in tree syntax with a union?
What is the symbol indicated the c-preprocessor?
Explain how do you determine the length of a string value that was stored in a variable?
Wt are the Buses in C Language
What are all different types of pointers in c?
What is c method?
what are the different storage classes in c?