If a five-digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits. For example if the number that is input is 12391 then the output should be displayed as 23402.
//Author::Mudasir Yaqoob.....
#include<stdio.h>
#include<conio.h>
int main()
{
long number,t;
int i=0;
long temp[5];
printf("Enter the five digit number:\n\n");
scanf("%ld",&number);
while(i<=4)
{
t=number%10+1;
temp[i]=t;
number=number/10;
i++;
}
printf("Reverse number\n\n\n\n");
for(i=4;i>=0;i--)
{
printf("%ld",temp[i]);
}
getch();
}
A keyboard is an input device while a mouse is just a pointing device. A keyboard can input characters such as letters and digits.
more that 50 digits.
Computer engineers use to use the hexadecimal code to program computers, or the base 16. Hexadecimal numbers use the digits 0 through 9, plus the letters A through F to represent the digits 10 through 15.
int Sum( int digits ) { if(digits < 10) return digits; return digits%10 + Sum(digits/10); }
The PEC must be 8 digits ending in a letter.
744 digits.
divid the last to digits by 4
707
Press Alt key in the keyboard and press the digits 0,1,6,9
Computer programmers use an array to arrange digits of a number in ascending order. The program uses character array to store the digits and a quick sort feature to sort them.
computer
630 digits.