answersLogoWhite

0


Best Answer

by this program you can find the factorial:

#include<iostream>

using namespace std;

main()

{

int n,x,f=1;

cin>> n;

x=0;

while(x<n)

{

x++;

f= f*x;

}

cout<<"factorial is"<<f<<"\n";

system("pause");

return 0;

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Using while loop Write a program find the factors of a number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative


Write a program large number and small number among n numbers by using If statement?

12


Write a Program to convert decimal number into hexadecimal no without using function and string?

This is not a question.


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


How do you write a C program to check whether the number is odd or even Ps-using DEV complier?

To write a C program to determine if something is odd or even you need to be a programmer. To write a program in C is complicate and only done by programmers.


Write a sample program using ASPNET explaining all the syntax and semantics of the program?

write a sample program using asp.net explaining all the syntax and semantics of the program


How do you write a program using 57252077?

Please be more explicit, 57252077 is a bit of a mystery. Do you want a program that uses the number 57252077 in some way?


Write a program using 8086 instructions to double a number?

There isn't a reason to write a complete program to do this; in any assembly language just shift the value 1 bit to the left to double it.


How do you write Square program using vb?

write a vb program to find the magic square


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal