[BIMG]http://sphotos.ak.fbcdn.net/photos-ak-sf2p/v298/74/32/596929947/n596929947_1187974_3848.jpg[/BIMG]
أَخْبِرِيْ الْكَوْنَ أَكْثِرْ ..
فَبَيْنَ شُمْسٍ عَلَىَ شَكْلِ ابْتِسَامَة..
وَ شَفَقْ الْعَيْنَيْنِ الْأَخْضَرْ ..
عَدَدٌ لَا نِهَائِيٌّ مِنْ الْنِّسَاء ..
#include < iostream>
Usning namespace std;
Void fun_num1 ();
Void fun_num2();
Void fun_num3 () ;
Void fun_num4 ();
showMenu();
Int main ()
{
Int x , a ;
Cout << " Emter a number please " << endl;
Cin >> x;
Cout <<endl;
A = 1 ;
while (a)
{
switch (x)
{
case 1:
Void fun_num1 ();
showMenu();
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
case 2:
Void fun_num2();
cout<<endl<<endl;
showMenu();
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
case 3:
Void fun_num3 () ;
cout <<endl<<endl;
showMenu();
cout<<"pleas enter a number :::"<<endl;
cin>>x;
break;
case 4:
Void fun_num4 () ;
cout <<endl<<endl;
showMenu();
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
/*case 5:
cout <<endl<<endl;
showMenu();
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
case 6:
cout <<endl<<endl;
showMenu();
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
case 7:
cout <<endl<<endl;
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
case 8:
cout <<endl<<endl;
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
case 9 :
a=0;
cout<<"have a nice day"<<endl;
cout<<"Thanks for using our system"<<endl;
cout<<"good bye"<<endl;
cout <<endl<<endl;
break; */
default:
cout <<endl;
cout<<" error in the selected number.."<<endl;
cout <<endl;
cout<<"pleas enter a number ::"<<endl;
cin>>x;
break;
}
}
Return 0;
}
Void showMenu()
{
Cout<<" computing area program "<<endl;
Cout<<"******************************************* *****"<<endl;
Cout<<endl;
Cout<<" A : compute the area by triangle method "<<endl;
Cout <<"press 1 : to compute the area by knowing base + height of triangle "<<endl;
Cout <<"press 2 : to compute the area by knowing base ,other distance in triangle and the angle between them "<<endl;
Cout<<"press 3 : to compute the area by knowing triangle's distances " << endl;
Cout <<endl<<endl;
Cout <<"press 4 : B : to compute the regular Area ( with hropizidal method "<<endl;
Cout <<endl; endl;
Cout<<"press 5 : C : to compute the irrigual areas wuth Grid method " << endl;
Cout<<"press 6 : to compute the irregular area by Tropezoidal method "<<endl;
Cout <<"press 7: to compute the irregular area by planometer method "<<endl;
Cout<<endl<<endl;
Cout<<" Volume "<<endl;
Cout <<"press 8: to compute volume by End – area method "<<endl;
Cout <<"press 9: to compute volume by Mean method "<<endl;
Cout <<"press 10: to compute volume by Pridmodial method "<<endl;
Cout <<"press 11: to compute volume by spot elevation "<<endl;
Cout <<endl;
Cout <<endl;
Cout << " Enter a number please : "<<endl;
}
Void fun_num1 ()
{
Int base , height ;
Double area ;
Cout << " Enter the base "<<endl;
Cin >> base ;
Cout << endl;
Cout <<" Enter the height "<<endl;
Cin<< height;
Cout <<endl;
Area = (height + base)*0.5;
Cout << " the Area is : " << area << endl;
}
Void fun_num2()
{
Int base , dis ;
Int ang;
Double area ;
Cout << " Enter the base "<<endl;
Cin >> base ;
Cout <<endl;
Cout << " Enter the distance "<<endl;
Cin >> dis ;
Cout <<" Enter the angle in dgree " << endl;
Cin >> ang ;
Cout <<endl;
Area = 0.5*base * dis * sin ( ang )
Cout << " the area is : " << area << endl;
}
Void fun_num3 ()
{
Double a, b ,c ;
Double s,a ;
Cout << " Enter the distance of the triangle A , B , C " << endl ;
Cin >> a ;
Cin >> b ;
Cin >> c ;
Cout << endl;
S = ( a + b + c ) *0.5 ;
A = ( s(s-a)(s-b)(s-c))^0.5
Cout << " the area is : "<< a << endl;
}
Void fun_num4 ()
{
Int x1 , x2 , x3 , x4 , x5 ;
Int y1 , y2, y3 , y4 , y5;
Double area ;
Cout << " Enter the value of x1 to x5 "<< endl;
Cin >> x1;
Cin >> x2;
Cin >> x3;
Cin >> x4;
Cin >>x5;
Cout <<endl;
Cout<<" Enter the value of y1 to y5 " <<endl;
Cin >> y1 ;
Cin >> y2;
Cin >> y3;
Cin >> y4;
Cin >> y5;
Cout<<endl;
Area = (y1*x1 + y2*x3 + y3*x4 + y4* x5 + y5*x1) – ( x1*y2 + x2*y3 + x3*y4 + x4*y5 + x5*y1);
Cout << " the area is "<< area << endl;
}
/*Void fun_num5 ()
{
}*/
طيب هيك وخلي الكومنت و غير الكابيتال لو سمحت واحكيلي كم ايرور بيطلعوا
[BIMG]http://sphotos.ak.fbcdn.net/photos-ak-sf2p/v298/74/32/596929947/n596929947_1187974_3848.jpg[/BIMG]
أَخْبِرِيْ الْكَوْنَ أَكْثِرْ ..
فَبَيْنَ شُمْسٍ عَلَىَ شَكْلِ ابْتِسَامَة..
وَ شَفَقْ الْعَيْنَيْنِ الْأَخْضَرْ ..
عَدَدٌ لَا نِهَائِيٌّ مِنْ الْنِّسَاء ..
الذين يشاهدون الموضوع الآن: 13 (0 من الأعضاء و 13 زائر)
مواقع النشر (المفضلة)