If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit.
Answer Posted / chirag
#include<stdio.h>
#include<conio.h>
void main()
{
int num,a,b,sum;
clrscr();
printf("enter a four digit no");
scanf("%d",&num);
a=num%10;
b=num/1000;
sum=a+b;
printf("sum is =%d",sum);
getch();
}
| Is This Answer Correct ? | 30 Yes | 15 No |
Post New Answer View All Answers
How old is c programming language?
How do you print an address?
What are compound statements?
What is a structural principle?
why we wont use '&' sing in aceesing the string using scanf
What is the difference between a string and an array?
Implement bit Array in C.
What are operators in c?
a c code by using memory allocation for add ,multiply of sprase matrixes
What is difference between function overloading and operator overloading?
How to explain the final year project as a fresher please answer with sample project
How do I use strcmp?
Explain why C language is procedural?
In a header file whether functions are declared or defined?
What is a stream water?