السـلآم عليكم
ممك احد يحل هالسؤالين و شووكرن
http://www.iraqup.com/up/20111118/8O..._167881174.jpg
http://www.iraqup.com/up/20111118/Y1..._311925465.jpg
عرض للطباعة
السـلآم عليكم
ممك احد يحل هالسؤالين و شووكرن
http://www.iraqup.com/up/20111118/8O..._167881174.jpg
http://www.iraqup.com/up/20111118/Y1..._311925465.jpg
مرحبا اخي
انا ها ساعدك بس البرنامج طويل و انا مشغول اخبرك الطريقة فقط
1- جدول فيه قيم year و weight
2- جدول فيه قيم wight class و regisrtation free
تقدر دير 1 و 2 ماتريس
بعدها ذلك نطلب من المستخدم ادخال الوزن و السنة و بعدها دير بوكل باها تبحث على المعلومات اللي دخلها المستخدم و يطبعها في الشاشة
امل اني ساعدتك اخي و سامحني و ارجو الدعاء لي
و عليكم السلام و رحمة الله و بركاته
http://www.iraqup.com/up/20111118/8O..._167881174.jpg
http://www.iraqup.com/up/20111118/Y1..._311925465.jpgكود:#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;
}
بالتوفيق أخي الكريم