#include<stdio.h>
#include<conio.h>
void main()
{
int i=0,,res=0;
int num,ar[5];
printf("\nEnter the number.\n");
scanf("%d",&num);
while(num>0)
{
ar[i]=num%10;
num/=10;
i++;
}
i--;
while(i>=0)
res=res+ar[i];
printf("Result is %d",res);
getch();
}
You write the number and then follow it with the digits in reverse order.
5
To write a program that inputs a number and displays the digits absent in it, you can follow these steps: Convert the input number into a set of its digits. Create a set of all possible digits (0-9). Subtract the set of digits from the complete set to find the missing ones. Display the missing digits. Here’s a simple example in Python: number = input("Enter a number: ") present_digits = set(number) all_digits = set('0123456789') missing_digits = all_digits - present_digits print("Missing digits:", ''.join(missing_digits))
All four of the digits given are significant digits.
One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.
Million is the name given to a number with 7 digits in front of the decimal place. In order to write out any number take the number you are given and and move the decimal place to the right until you have 7 digits in front of the decimal. add zeros to the end until it has 7 digits in front of the decimal place. So 2.25 million would be 2,250,000.
36
03458
The number is 36.
3 and 6
If the sum of the digits of a given number equals nine or a multiple of nine, nine is a factor of that number.
There are three significant digits in the given number.