If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.
Answer Posted / anil
#include<stdio.h>
#include<conio.h>
void main()
{
int num,first,last,total;
printf("enter the 4 digit number");
scanf("%d",&num);
first=num/1000;
last=num%10;
total=first+last;
printf("the total of first and last digit is %d",total);
getch();
}
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
Is c procedural or functional?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
Explain the use of function toupper() with and example code?
how is the examination pattern?
What is the use of function in c?
What is a good way to implement complex numbers in c?
Why can’t constant values be used to define an array’s initial size?
How can you find out how much memory is available?
Explain logical errors? Compare with syntax errors.
Can a program have two main functions?
What are the 5 data types?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
What is bash c?
Why ca not I do something like this?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?