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
Why is c so important?
How are structure passing and returning implemented?
What is static identifier?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
How a string is stored in c?
What is conio h in c?
What does it mean when the linker says that _end is undefined?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
What is the role of && operator in a program code?
What are the back slash character constants or escape sequence charactersavailable in c?
Which type of language is c?
What does %d do in c?
Why c is called free form language?
Write a function that will take in a phone number and output all possible alphabetical combinations
What is function what are the types of function?