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
how to build a exercise findig min number of e heap with list imlemented?
hi, which software companys will take,if d candidate's % is jst 55%?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
How do you define CONSTANT in C?
List the variables are used for writing doubly linked list program.
How can you read a directory in a C program?
Why doesnt long int work?
Which is more efficient, a switch statement or an if else chain?
What does nil mean in c?
What is 1d array in c?
Difference between Function to pointer and pointer to function
What is function prototype in c language?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What is a keyword?