answersLogoWhite

0


Best Answer

using c program write factorial number with do..while statement

User Avatar

Wiki User

โˆ™ 2009-03-11 02:49:18
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
User Avatar
Study guides
๐Ÿ““
See all Study Guides
โœ๏ธ
Create a Study Guide

Add your answer:

Earn +20 pts
Q: Using do while statement write cprogram for factorial number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you find the factorial using while loop in c plus plus?

unsigned __int64 factorial(unsigned __int64 number) { unsigned __int64 factorial=1; while(number) factorial*=number--; return(factorial); }


Programming to calculate a factorial number?

By the definition of a factorial, multiply all numbers up to the number given. For example (using Java code): int number = 5; // Sample value long factorial = 1; for (int i = 1; i <= number; i++) { factorial *= i; } System.out.println(number + "! = " + factorial);


Factorial in c program using for loop?

#include int main() { int fact,Factorial; printf("Please Enter Factorial Number\n"); scanf("%d",&fact); Factorial=func_fact(fact); printf("factorial is %d\n",Factorial); } int func_fact(int number) { int i; int factorial=1; for(i=number;i>=1;i--) { factorial=factorial*i; } return factorial; }


How do you write flowchart to find factorial of given number using recursive and non recursive?

1. flochart of cp Program to find factorial of number using function


Write a function to calculate the factorial value of any integer entered through the keyboard?

#include <iostream> using namespace std; int main() { int i, number=0, factorial=1; // User input must be an integer number between 1 and 10 while(number<1 number>10) { cout << "Enter integer number (1-10) = "; cin >> number; } // Calculate the factorial with a FOR loop for(i=1; i<=number; i++) { factorial = factorial*i; } // Output result cout << "Factorial = " << factorial << endl;


Program for finding the factorial of the two given number using constructor?

kjhk


C program to find factorial of a given number using pointers?

factorial of a given number using pointers. #include<stdio.h> #include<conio.h> main() { int n, factorial; printf("\nEnter a number"); scanf("%d", &n); factcompute(n, &factorial); printf("\nThe factorial of %d is %d", n, factorial); } factcompute(a, b) int a, *b; { int m; *b = 1; for (m = 1; m <= a; m++) *b = *b * m; getch(); }


Write a program to find the factorial value of the given number using for loop?

In Java (not tested): long factorial(int number) { long result = 1; for (int i = 1; i


Write a program that the user will enter a number and display the factorial number and it's answer?

#include <iostream> #include <cctype> using std::cin; using std::cout; using std::endl; using std::tolower; long factorial(const int& N); int main() { int N = 0; //factorial of N char command = 'n'; do { cout << "Enter a number to calculate factorial: "; cin >> N; cout << endl << "Factorial of " << N << " is: " << factorial(N) << endl; cout << "Do you want to continue (y/n)?"; cin >> command; cout << endl; } while ('y' 0) { return 1; } else { return (N * factorial(N - 1)); } }


By using call by reference find the factorial of a number?

chutia mc,bc bhosdika


What is recursion function in C programming?

w.a.p. to find factorial of a number using recursion


How do you write a C program to find factorial of given integer with out using non-recursive function?

//Factorial using recursive function #include <stdio.h> //To increase the limit, the return type should be changed to unsigned long int fact(int number) { if (number == 0) return 1; return fact(number-1) * number; } int main(void) { int number ; printf("Enter the number to find the factorial:"); scanf("%d",&number); printf("The factorial is:%d",fact(number)); return 0; }


How can you get the number 25 by using only number 4?

(4 times 4 factorial + 4) divided by 4 4 factorial + the square root of 4 minus (4 divided by 4)


Write a shell program to find factorial using loop?

echo factorial of a number echo Enter the number read n i=1 fact=1 while test $i -le $n do fact=`expr $fact \* $i` i=`expr $i + 1` done echo The factorial of a number is $fact


What is a Flow chart for finding factorial of a given number using recursion function?

no answer....pls post


To calculate factorial of a number using for loop?

int factorial(int n) { int total = 1; for(; n > 1; n--) total *= n; return total; }


Write a example of recursion?

Following function calculates factorial of a number using recursion. unsigned int factorial(unsigned int a){if (a == 1)return 1;else{a *= factorial(a-1);return a;}} recursion n. see recursion.


Write a recursive procedure to compute the factorial of a number?

public static int factorial(int n) { if (n == 1) { return 1; } else { return n * factorial(n - 1); } } \\then test by using main method


Abap Program To find Factorial of number?

DATA: output TYPE i. PARAMETERS: p_num TYPE i. START-OF-SELECTION. PERFORM factorial USING p_num CHANGING output. WRITE:/ output. *&---------------------------------------------------------------------* *& Form factorial *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM factorial USING num CHANGING out. DATA: lv_num1 TYPE i, out1 TYPE i. IF num > 1. lv_num1 = num - 1. PERFORM factorial USING lv_num1 CHANGING out1. out = num * out1. ELSE. out = num. ENDIF. ENDFORM. " factorial


Factorial of a given number using functions?

double factorial(double N){double total = 1;while (N > 1){total *= N;N--;}return total; // We are returning the value in variable title total//return factorial;}int main(){double myNumber = 0;cout > myNumber;cout


C plus plus program to find factorial of given number using function overloading?

Use this function: long factorial(int N){if (N == 0){return 1;}else{return N*factorial(N-1);}}


Recursive function to find nth number of the Fibonacci series?

#include #include using std::cin;using std::cout;using std::endl;using std::tolower;long factorial(const int& N);int main(){int N = 0; //factorial of Nchar command = 'n';do{cout > N;cout


Program to find n th fabonacci number?

#include #include using std::cin;using std::cout;using std::endl;using std::tolower;long factorial(const int& N);int main(){int N = 0; //factorial of Nchar command = 'n';do{cout > N;cout


Program to find factorial of a number using recursion?

A C, C#/Java code segment:int Factorial(int n) {if (n


How do you make the number 11 using only 4' s?

(4!+4!-4)/4 ! means factorial, A factorial is every number below it multiplied Ex. 4!=4x3x2x1 which = 24(24+24-4)/4

People also asked

Complete solved exercise of Right Byte Book 3 Revised Edition for secondary classes by samrina anwar?

View results