C++ Program to Find Multiplication of First Seven Numbers

In this program, we will find the multiplication of 1 to 7 numbers.



Source Code
#include <iostream>
using namespace std;

int main()
{
    int i, mul=1;
    for(i=1; i<=7; i++)
    {
        mul = mul * i;
    }
    cout<<"Multiplication of 1 to 7 numbers is: "<< mul;
    return 0;
}
Output
Multiplication of 1 to 7 numbers is: 5040