السلام عليكم و رحمة الله و بركاته
اتمنى مساعدتي بحل هذه الاسئلة :(
http://www.iraqup.com/up/20111118/8OuL3-pPf0_167881174.jpg
http://www.iraqup.com/up/20111118/Y1sgX-8O3x_311925465.jpg
بانتظار من يعلم
السلام عليكم و رحمة الله و بركاته
اتمنى مساعدتي بحل هذه الاسئلة :(
http://www.iraqup.com/up/20111118/8OuL3-pPf0_167881174.jpg
http://www.iraqup.com/up/20111118/Y1sgX-8O3x_311925465.jpg
بانتظار من يعلم
وﻻ تعقد نفسك وﻻ شئ هذة أجابة السؤال اﻻول: أى رقم 4
#include <iostream>
using namespace std;
int main()
{
double timefun ;
cout << "Enter fund time: ";
cin >> timefun;
if(timefun >= 5 )
cout << "Interest Rate: 40% for: " << timefun << endl;
else if(timefun < 5 && timefun >= 4 )
cout << "Interest Rate: 35% for: " << timefun << endl;
else if(timefun < 4 && timefun >= 3 )
cout << "Interest Rate: 30% for: " << timefun << endl;
else if(timefun < 3 && timefun >= 2 )
cout << "Interest Rate: 25% for: " << timefun << endl;
else if(timefun < 2 && timefun >= 1 )
cout << "Interest Rate: 20% for: " << timefun << endl;
else if(timefun < 1 )
cout << "Interest Rate: 15% for: " << timefun << endl;
return 0;
}وهذا لسؤال الثانى فقط محتاج منك القليل من المجهود تتبع طريقة وسوف تكمل التمرين بنجاج ان شاء الله ...
#include <iostream>
using namespace std;
int main()
{
int year = 0, weight = 0;
cout << "Enter Car's year: ";
cin >> year;
cout << "Enter Car's weight: ";
cin >> weight;
/// 1990
if( year < 1991)
{
if(weight < 2700 )
cout << "weight calss : 1 and reg fees: 26.50 " << endl;
else if( weight > 2699 && weight < 3801 )
cout << "weight calss : 2 and reg fees: 35.50 " << endl;
else if( weight > 3800 )
cout << "weight calss : 3 and reg fees: 56.50 " << endl;
}
/// 1991 to 1999
else if( year < 1990 && year < 2000)
{
// same code above ...
}
// greater than 2000
else if( year> 1999)
{
// same code above ...
}
return 0;
}تحياتى العطرة والله الموفق.... .
تم تعديل هذه المشاركة بواسطة محمد ابوزايد في 29 ديسمبر 2011 في 14:58
محمد ابوزايد كتب:وﻻ تعقد نفسك وﻻ شئ هذة أجابة السؤال اﻻول: أى رقم 4
#include <iostream> using namespace std; int main() { double timefun ; cout << "Enter fund time: "; cin >> timefun; if(timefun >= 5 ) cout << "Interest Rate: 40% for: " << timefun << endl; else if(timefun < 5 && timefun >= 4 ) cout << "Interest Rate: 35% for: " << timefun << endl; else if(timefun < 4 && timefun >= 3 ) cout << "Interest Rate: 30% for: " << timefun << endl; else if(timefun < 3 && timefun >= 2 ) cout << "Interest Rate: 25% for: " << timefun << endl; else if(timefun < 2 && timefun >= 1 ) cout << "Interest Rate: 20% for: " << timefun << endl; else if(timefun < 1 ) cout << "Interest Rate: 15% for: " << timefun << endl; return 0; }وهذا لسؤال الثانى فقط محتاج منك القليل من المجهود تتبع طريقة وسوف تكمل التمرين بنجاج ان شاء الله ...
#include <iostream> using namespace std; int main() { int year = 0, weight = 0; cout << "Enter Car's year: "; cin >> year; cout << "Enter Car's weight: "; cin >> weight; /// 1990 if( year < 1991) { if(weight < 2700 ) cout << "weight calss : 1 and reg fees: 26.50 " << endl; else if( weight > 2699 && weight < 3801 ) cout << "weight calss : 2 and reg fees: 35.50 " << endl; else if( weight > 3800 ) cout << "weight calss : 3 and reg fees: 56.50 " << endl; } /// 1991 to 1999 else if( year < 1990 && year < 2000) { // same code above ... } // greater than 2000 else if( year> 1999) { // same code above ... } return 0; }تحياتى العطرة والله الموفق.... .
تسلم اخوي بارك الله فيك ^^