answersLogoWhite

0


Best Answer

Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Using while loop write a program which calculates the product of digits from 1 to 5 and also show these nos vertically?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is a program that calculates the sum of any 5 digit integer number entered by user?

#include<iostream> unsigned sum_of_digits(unsigned num) { unsigned sum = 0; do { sum += num%10; } while (num/=10); return sum; } int main() { unsigned number = 12345; unsigned sum = sum_of_digits (number); std::cout << "Sum of digits in " << number << " is " << sum << std::endl; }


Write a program in java to enter 3 digits or more arrange the digits of the entered number in ascending order and display the result?

public static void main(String[] args) { int val = 100; int val1 = 50; System.out.println("Number of digits in " + val + " is: " + new String(val + "").length()); System.out.println("Number of digits in " + val1 + " is: " + new String(val1 + "").length()); }


How to write A Java program to print number of digits in a given number?

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.


How many digits in bar code?

That is almost like asking how many digits are in a number. The only limit is the amount of space available for a barcode. Even the size of most scanners does not create an absolute limit because there are barcode readers that look like a pen and read the barcode information serially (one digit at a time). Perhaps you would like to rephrase your question to find out about a particular barcode application. For example, Universal Product Codes (UPC's) usually have ten digits. The first five identify the manufacturer or distributor, and the other five identify a unique product, including a particular size or quantity of the product. UPC's do not contain any price information; that information is cross referenced by the store's computer after the UPC is scanned.


C program to find the sum of odd positioned digits and even positioned digits of a number seperately?

#include<stdio.h> #include<conio.h> main() { int n,s,r,t; clrscr(); printf("enter n"); scanf("%d",&n); s=0;t=0; while(n!=0) { r=n%10; { if(r%2!=0) t=t+r; if(r%2==0) s=s+r; } n=n/10; } printf("sum of even position digits%d\n",s); printf("sum of odd position digits%d\n",t); getch(); }

Related questions

What does product of digits mean?

Mutilply the values of the digits.


The sum of your digits is 16 The product of your digits is 64 What number are you?

88


How many two digits numbers are there in which the product of the digits is even?

two


What even number has digits whose product is ten?

52 is a number whose digits have a product of 10.


The sum of your two digits is the same as the product of your two digits you are a multiple of 11 who am i?

22


Find 5 four digit numbers such that the product of the digits of each four digit prime number are also prime?

You had me until "product." The product of 4 digits can't be prime.


How many digits can the product of 2-digit numbers have?

If you mean, "What is the largest number of digits possible in the product of two 2-digit numbers" then 99 * 99 = 9801, or 4 digits. Anything down to 59 * 17 = 1003 will have 4 digits.


What is 310 times 20 in significant digits?

When using significant digits, the product has only the number of significant digits as the lowest number in the factors. "20" has two significant digits and "310" has three. Therefore, the product has to have two significant digits. 310 × 20 = 6200 6200 already has two significant digits.


How many digits in a program element code?

The PEC must be 8 digits ending in a letter.


What fraction of all 4 digits natural numbers have a product of their digits that is even?

67/72 of them.


How many digits will be there in the product of 4x400?

400 x 4 = 1600 Therefore, four digits.


How many digits can the product of two 2 -digit numbers have?

from 3 digits (10x10) to 4 digits (99X99)