#include <iostream>
using namespace std;
int main()
{
int chiffre, nb_multiplication, resultat;
cout << "Entrez le chiffre a multiplier: ";
cin >> chiffre;
cout << "Entrez combien de fois ce chiffre va etre multiplie: ";
cin >> nb_multiplication;
for( int i = 1; i <= nb_multiplication; i++){
resultat += chiffre;
}
cout << "Le resultat de la multiplication est " << resultat << endl;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter