MSK Technologies

Home
Practice Programs
Java Programs Python Programs Java Quiz
Pages
Python Java Material PLSQL Material
Search A Job

Write a C-program to print factorial of n numbers using do while loop?

  1. Home
  2. C Language Programs

Write a C-program to print factorial of n numbers using do while loop?

Write a C-program to print factorial of n numbers using do while loop


#include <stdio.h>
int main() {
    int x=1,n,fact=1;
    printf("Enter n value ");
    scanf("%d",&n);
    do
    {
        fact=fact*x;
        printf("\n%d Factorial is %d",x ,fact);
        x++;
    }while(x<=n);
    return 0;
}

Output:

Enter n value 5

1 Factorial is 1
2 Factorial is 2
3 Factorial is 6
4 Factorial is 24
5 Factorial is 120




More Programs


84 . Write a C-program to print factorial number using do while loop
85 . Write a C-program to print factorial of n numbers using do while loop
86 . Write a C-program to print sum of natural numbers using do while loop
87 . Write a C-program to print sum of even numbers using do while loop
88 . Write a C-program to print sum of odd numbers using do while loop
89 . Write a C-program to print sum of even or odd numbers based on the n value using do while loop
90 . Write a C-program to print sum of even or odd numbers based on the n value using single do while loop
91 . Write a C-program to display table using do while loop
92 . Write a C-program to print a to z using do while loop
93 . Write a C-program to print ASCII values of a to z using do while loop
94 . Write a C-program to print ASCII values of A to Z using do while loop



Apply For The Job

Apply For Job

Java Material

Python Material

PLSQL Material

.Net Material

Java Practice Programs

400 Java Programs

Java Practice Programs

Write a Java Program to find largest and second largest in an array

Write a Java program to accept a float value of number and return a rounded float value

Write a Java program that takes two numbers and display the product of two numbers

Write a Java program to check if a positive number is a palindrome or not

Write a Java program to compute the square root of an given integer

Python Practice Programs

Write a Python program to display the current date and time.

Write a python program to access news using python

Write a Python Program to calculate your Body Mass Index.

Write a Python Program to Find LCM.

Write a Python program to convert Celsius to Fahrenheit.

Java Quiz

Java Quiz - 7

Java Quiz - 22

Java Quiz - 14

Java Quiz - 11

Java Quiz - 3

Courses
Java Python PLSQL .Net ADO.Net About Us
Quick Links
Daily Use English Sentences Daily General Knowledge General Knowledge Latest Update Inventions and Inventors జనరల్ నాలెడ్జ్ General Knowledge Spoken English Spoken Hindi GK Hindi Telugu Facts Unknown Facts Psychology Facts Motivation Quotes విటమిన్ - సి,డి,ఇ,కె Android
Spiritual
రాధాకృష్ణ భగవద్గీత Motivation Quotes Slokas Talapatra Nidhi ఆధ్యాత్మిక భక్తి ప్రపంచం Sadhguru Sai Motivation Quotes గౌతమ బుద్ధుడు Bhagavad Gita Quotes
Newsletter

Dolor amet sit justo amet elitr clita ipsum elitr est.

© sateeshm, All Right Reserved. Designed By sateeshm
Home Help FQAs