صفحه ی اول
#include <iostream.h>
int main()
{
int x;
cout<<"Please enter a number between 1 & 7:"<<endl;
cin>>x;
switch(x)
{
case 1: cout<<"Saturday";break;
case 2: cout<<"Sunday";break;
case 3: cout<<"Monday";break;
case 4: cout<<"Tuesday";break;
case 5: cout<<"Wednesday";break;
case 6: cout<<"Thirsday";break;
case 7: cout<<"Friday";break;
default: cout<<"Wrong number!";
}
return 0;
}
//end
int main()
{
int x;
cout<<"Please enter a number between 1 & 7:"<<endl;
cin>>x;
switch(x)
{
case 1: cout<<"Saturday";break;
case 2: cout<<"Sunday";break;
case 3: cout<<"Monday";break;
case 4: cout<<"Tuesday";break;
case 5: cout<<"Wednesday";break;
case 6: cout<<"Thirsday";break;
case 7: cout<<"Friday";break;
default: cout<<"Wrong number!";
}
return 0;
}
//end
20-الگوریتمی بنویسید که اعداد زوج بین ا تا 100 را چاپ کند
Int main ( )
{
Int s,k;
Cout<<"even number between 1 and 100are :";
For (int i=1; i<100; i++)
{
K=i%2;
If (k==0)
Cout<
}
Return 0;
}