C++ Program to Find the Factorial of a Number Tutorial

preview_player
Показать описание
In this Tutorial you will learn to write a C++ Program to find the factorial of a number using Iterative Method ( for loop ).

The factorial of a positive integer n, which is denoted as n!, is the product of all positive integers less than or equal to n.

That is n! = n * (n-1)*(n-2)*....*3*2*1

So 4! = 4 * 3 * 2 * 1 which is equal to 24.

Factorial for the numbers 0 and 1 is 1. That is 0! = 1 and 1! = 1.
For negative numbers factorial value doesn't exists.

Our Website

Social Media
Рекомендации по теме
Комментарии
Автор

Man I learnt this problem in school but used Java you made me more clear tho on how to make programmes on c++

midnightphantom
Автор

Man great video! thanks alot for the help!!!

brandonmatthai
Автор

Please can you do a video on how to design and implement an algorithm for constructing Canonical LR (0) items and SLR parsing table for a Grammar G and use same to implement your chosen grammar.

ogochukwuujunwa
Автор

Hello, guy. I don't know if you're taking requests, but there's a portion of a CS50 problem that requires finding a cycle in a directed graph. Could you do a video on that for Clang or for Depth First Search? Cause that section of the problem is ruining me, and another Youtuber called it "the most difficult function you'll have to write in the entire course".

Venezuelangel
Автор

How do you modify the code to only accept whole numbers?

buyisizwedlamini
Автор

Is this course completed plz reply sir

nishantdon
Автор

is this is the last lecture of this series. ???

pranavthakur
Автор

Sir please start java from starting to ending

ritu-hbbj
Автор

Sir please make a video on c++17 new features

dhanviakash
join shbcf.ru