السلام عليكم ورحمته الله وبركاته
سوال جانى بالاختبار وحليته والله الحمد بس للاسف كان عندى ارور والى الان احاول معرفه الجواب الصحيح الاستفاده من هذه الاخطا بالمستقبل
وهذا السوال:
Write a program that compute and display the suitable size of clothing (Hat , Jacket
chest, and waist) by asking the user about his weight, height, and age.
Hint :- your program should contain these three functions:-
Hat_size() that calculate the hat size by using this equation
• Hat size =(weight/height)*2.9
Jacket_chest_size() that calculate the Jacket chest size by using this equation
• Jacket chest size ={[(weight*height)/288]+1/8} *(ageOver30/10)
Waist_size() that calculate the waist size by using this equation
• Hat size =[(weight/5.7)+(1/10) ]*(ageOver28/2)
وهذا جوابى :
#include<iostream>
using namespace std ;
double weight;
double height;
int ageOver ;
double Hat_size;
double Jacket_chest_size ;
double Waist_size ;
void Hat_size(){
Hat_size =(weight/height)*2.9 ;
}
void Jacket_chest_size(){
Jacket_chest_size ={[(weight*height)/288]+1/8} *(ageOver30/10) ;
}
void Waist_size(){
Hat_size =[(weight/5.7)+(1/10) ]*(ageOver28/2);
}
int main ()
{
cout<<"plass Enter the age:\n" ;
cin>> ageOver ;
cout<<"plass Enter the weight: \n" ;
cin>> weight ;
cout<<"plass Enter the hight:\n" ;
cin>> height ;
Hat_size();
Jacket_chest_size();
Waist_size();
return 0;
}
ياليت اى احط يعرف الجواب الصحيح يحط الكود علشان نستفيد ونتجنب هذه الاخطا بالمستقبل
