Skip to content

Rubal Solutions Welcomes You All

Menu
  • About
  • Blog
  • Contact
  • Youtube Video’s
Menu

Popular C Program – Factorial in C

Posted on September 11, 2020September 12, 2020 by rubal solutions

C Language is Basic Language .. Many Advanced Language have come still if u can understand basic language carefully u can do all other languages in easy way. So here is our efforts of giving programs which are well executed in our Rubal Solutions Server and confirm to be running successfully. we have our c programming full tutorial on rubal solutions you tube channel. u can learn theory and practical’s from there … ask any queries if needed.

Factorial Program in C

A Useful and Popular Program in C Programming .

Factorial of number is 123*4….n
To find factorial of a number , u should have knowledge about loops, conditions , operators , data types.

Let’s develop Program for Finding Factorial till given n number in C

#include <stdio.h>
int main()
{
printf("Welcome to Rubal Solutions!\n\n");
printf("Do Like Share Comment Subscribe and Support !\n\n");
int num, iter;
long fact = 1; // initializing factorial to 1
printf("Enter a positive integer: ");
scanf("%d",&num);
if (num < 0) // If the user enters a negative number
printf("The factorial of a negative number does not exist\n");
else
{
for(iter = 1; iter <= num; iter++)
{
fact = fact*iter;
}
printf("The factorial of %d is %lu\n", num, fact);
}
return 0;
}

 1,657 total views,  1 views today

Related

Category: Coder Rubal Solutions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About This Site

We are Rubal Solutions.

A Youtuber Content Creator .

Make Videos On Various Education and Knowledgeable Content.

Rubal Solutions Youtube Videos

https://www.youtube.com/watch?v=TIEdpemeokw

Follow and Support On

Address:

Facebook- https://www.facebook.com/rubalsolutions/

Twitter – https://twitter.com/ruby0071

Instagram – https://www.instagram.com/rubalsolutions

Blogger – https://rubalsolutions.blogspot.com/

© 2025 Rubal Solutions Welcomes You All | Powered by Minimalist Blog WordPress Theme