top of page
for loop جدول الضرب بإستعمال

1-#include<iostream>//نبدأ بوضع المكتبات
2-using namespace std;//نبدأ بوضع المكتبات
3-int main(){//الدالة الرئيسية
4-int numberTable;
5-while(true){//تقوم بتكرار ما سيحصل من رقم 5 إلى رقم8
6-cout<<"please choose from 1 to 10 to show the multiplication table for it"<<endl;
7-cin>>numberTable;

8-for(int i=1; i<10; i++){
9-cout<<numberTable<<"*"<<i<<"="<<numberTable*i<<endl;}}
//نقوم بأمر الطباعة لجدول الضرب ونقوم بوضع الأمر الذي يقوم بالعملية الحسابية 8
return 0;
}

image.png
bottom of page