What would you like to do?

# If a five digit number is input through the keyboard write a program to calculate the sum of its digits?

# Write a program in c language to reverse the five digits number?

//Reverse of the Number // Programme Written By Maulin Thaker Ahmedabad; #include #include void main() { int a,b,c,d,e; clrscr(); printf("Enter the Number to Find it's Revers…e\\n"); scanf("%d",&a); while(a!=0) { b=a%10; c=a/10; printf("%d",b); a=c; } getch(); }

# Write a program that inputs four digits numbers like 1234 from user and then display it in reverse order in c language?

include # include void main() { int n; printf("enter the number"); scanf("%d",&n); while(n>0) { s=n%10; printf("%d",s); n=n/10; } getch(); }…

# Write a c program to compute the sum of digits of a given integer number?

int sumDigits(int n) { int sum = 0; while( n > 0 ) { sum += (n % 10); // add last digit of n to sum n /= 10; // divide n by 10 to "chop off" the la…st digit } return sum; } ____________________________________________________ C program to find the sum of entered digit: By Jatinder Pal Singh #include #include void main() { clrscr(); int n,num,x,sum=0; printf("Enter a number="); scanf("%d",&n); while(n>0) { x=n%10; sum=sum+x; n=n/10; } printf("Sum of digits of a number=%d",sum); getch(); }

# Write a C program for sum of two digit numbers by using loop?

include void main() { int no,rem=0,sum=0,n; /*declaration*/ printf("Enter 2 digit number:"); scanf("%d",&no); for(n=1;n…

# How do you write a C program to reverse the digits of a number?

include #include void main() { int a,b; printf("Enter number:\\t); scanf("%d",a); printf("Reversal of number: "); do { b=a%10; printf("%d",b); a = a/10; … } while(a>0); getch(); }

# Write a program to find the number of digits in the number?

#include int main(int argc, char **argv) { if (argc…

# Any integer is input through the keyboard write a c program to find out whether it is an odd number or even number?

any integer is input through the keyboard. write a program to find out whether it is an odd number or even number using if else statement in c#.

# Write a program to count the number of times the digit is present?

include #include void main( ) { int a[50],i,n,s,t=0;/* the digit 50 can be any integer, its a user defined function a[limit]*/ clrscr( ); printf("\\n\\nenter the n…umber of elements u want to enter"); scanf("%d",&n); printf("\\n\\nenter the numbers u desire"); for(i=0;i

# Write a program to calculate the sum of two numbers?

#include #include void main() { int a,b,c; clrscr(); a=20,b=30; c=a+b; printf("the sum of two number is %d",c); getch(); … }/*the program is closed here*/ output of the program is the sum of two numbers is 50

# Write a program to compute sum of digits of a given number in Java?

public static final int getSumDigits(int n) { int sum = 0; while( n != 0 ) { // Add right most digit to sum sum += n % 10; // Chop off right most digit from n n… /= 10; } return sum; }

# The sum of the digits of the number is 6?

the sum of my digits is 6? answer=60

Answered

# Write a program that would find the count of occurrence of largest digit in the input number?

include #include void main() { long int n,r,m,max=0,count=0; clrscr(); printf("Enter the Number:"); scanf("%ld",&n); m=n; … while(n>0) { r=n%10; if(r>max) max=r; n=n/10; } printf("\\nLargest Digit is = %ld",max); while(m>0) { r=m%10; if(r==max) count++; m=m/10; } printf("\\n\\nOccurence of Largest Digit %ld is = %ld",max,count); getch(); } output: Enter the Number:68596999 Largest Digit is = 9 Occurence of Largest Digit 9 is = 4

Answered

# A five digit no is entered through the keyboard write a program to obtain the reversed no and to determine whether the original no and reversed no is equal or not?

1) first you have to find the reverse of an integer.. code is given below, #include void main() { int a,b,m,s=0; printf("enter the value of a"); scanf("%d",&a); b=a; …while(a!= 0) { m=a%10; s=s*10+m; a=a/10; } if(s == b) { printf("original number is equal to the reversed number"); } else { printf("original number is not equal to the reversed number");

Answered

In Technology

# How do write a program using one dimensional array that calculates the sum and average of the five input values from the keyboard and prints the calculated sum and average?

include #include void main() { float arr1[5], avg=0, sum=0; cout…

Answered

# Number that the sum of its digits multiplied by the product of its digits is the number?

There are at least four answers, although the first two aren't very interesting: 0 = 0 * 0, 1 = 1 * 1, 135 = (1+3+5)*(1*3*5) = 9*15 144 = (1+4+4)*(1*4*4) = 9*16