No products in the cart.

Write a program in C++ to …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a program in C++ to get factorial of a no using do while loop.

  • 1 answers

Raja Ratnam 8 years, 1 month ago

#include<iostream.h>

void main()

{ int a,  fact=1;

cout<<"enter a number";

cin>>a;

while(a>0)

{f=f*a;

a--;}

cout<<"factorial of "<<a<<" is"<<f;}

}

 

http://mycbseguide.com/examin8/

Related Questions

Write a program for swapping two numbers?
  • 0 answers
Write a program for swapping two numbers
  • 1 answers
Define packages
  • 0 answers
What is alu
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App