Вы находитесь на странице: 1из 3

Q # 01: Write a Programme in C++ that calculate the factorial of the given number? # include <iostream.h> # include <conio.

h> void main(void) { clrscr(); int a; int fact=1; cout<<"Enter the num whose you want factorial......"; cin>>a;

for(int i=a; i>=1; i--) { fact=fact*i;

stop } cout<<"Factorial is......."<<fact; getche(); }

Q # 03:

# include <iostream.h> # include <conio.h> void main(void) { clrscr();

for(char i=65; i<=69; i++) { cout<<i<<"."; for(char j=65; j<=i; j++) { cout<<j; } cout<<endl; } getche(); }

Q # 02:

# include <iostream.h> # include <conio.h> void main(void) { clrscr();

for(char i=65; i<=69; i++) { cout<<i<<"."; for(char j=65; j<=i; j++) { cout<<j; } cout<<endl; } getche(); }

Вам также может понравиться