ام سرمد

ام سرمد @am_srmd

عضوة فعالة

طلب مستعجل بليز عندي مجموعة اسئلة بلغة السي ++

الحاسب والجوال

عندي مجموعة اسئلة بلغة السي ++ وامنى انكم تساعدوني فيهن

والله درجاتي بتروح اذا ما حليت قبل يوم السبت

السؤال الاول:
write assignment statement for the following formulae:
a) y=(load*length)/(area*extension)

b) t=(2m1m3)/(m1+m2)

c) distance=(x2+y2+z2)2

(ملحوظة في السؤال الثاني الارقام الي تجي بعد الحرف اقصد بها ترتيب الحرف مثل ب1 ب2 ب3 وهكذا، اما في السؤال الثاني اقصد 2 اهي مثل ما نقول في الرياضيات اكس اوس 2 يعني كأنها مضروبة مرتين وحتى 2 الاخيرة بعد القوس اهي اوس 2للقوس كلة.

السؤال الثاني
write a progeam to accept three subject marks from a student and check the average mark is above the pass mark 50 or not.print the average mark and the result PASS if the average is above 50
وبعدين عاطنا جدول فية
sample output:

subject 1 mark: 64
subject 2 mark : 74
subject 3 mark : 52
average mark = 63
result: pass

السؤال الثالث :
write a c program to evaluate the expression named as P and defined as:
P= ax2+bx2+c if x<=0
= bx2+ax-c if x>0

هنا ملحوظة نفسها 2 اقصد بها اوس 2

السؤال الرابع

Develop a c program, using if statment, to find the smallest of the three unequal positive integers.

ارجوكم ساعدوني في هذي الاسئلة جعلها الله في ميزان حسناتكم
3
397

يلزم عليك تسجيل الدخول أولًا لكتابة تعليق.

تسجيل دخول

دمعة طفل
دمعة طفل
متى تبغينها
ممكن اشوفها لك خميس وجمعه
netjaeper
netjaeper
السؤال الثاني :

#include<iostream.h>
#include<conio.h>

main( )
{
clrscr( );

int marks;

cout<<"\n Enter your Marks = ";
cin>>marks;

cout<<"\n Result = ";

if(marks>=50)
cout<<"Pass"<<endl;

else
cout<<"Fail"<<endl;

getch( );
return 0;
}


هذا البرنامج يقوم بإدخال درجة واحدة من 0 إلى 100

و إذا كانت الدرجة أكبر من أو تساوي 50 يطبع Pass و إلا فالبرنامج يطبع Fail

و تقدرين تطورين البرنامج أكثر .. بحيث يدخل 3 درجات

و يجمعها مع بعض

و يكون المتوسط ( Average ) هو عبارة عن مجموع الدرجات ÷ 3

و إذا كان هذا المتوسط أكبر من أو يساوي 50 فالبرنامج يطبع Pass و إلا فالبرنامج يطبع Fail




و هذا نفس البرنامج .. لكن يدخل 3 درجات

نفس ما هو مطلوب في السؤال

#include<iostream.h>
#include<conio.h>

main( )
{
clrscr( );

int mark_1;
int mark_2;
int mark_3;

cout<<"\n Enter the first mark = ";
cin>>mark_1;

cout<<"\n Enter the second mark = ";
cin>>mark_2;

cout<<"\n Enter the third mark = ";
cin>>mark_3;

cout<<"\n Result = ";

if((mark_1 + mark_2 + mark_3)/3 >=50)
cout<<"Pass"<<endl;

else
cout<<"Fail"<<endl;

getch( );
return 0;
}










السؤال الرابع :

#include<iostream.h>
#include<conio.h>

int smallest(int,int,int);

main()
{
clrscr();


int value_1;
int value_2;
int value_3;
int minimum;

cout<<"\n Enter the value_1 = ";
cin>>value_1;

cout<<"\n Enter the value_2 = ";
cin>>value_2;

cout<<"\n Enter the value_3 = ";
cin>>value_3;

minimum=smallest(value_1,value_2,value_3);

cout<<"\n The smallest integer is = "<<minimum<<endl;

getch();
return 0;
}



int smallest(int x,int y,int z)
{
int smallest=x;

if(y>smallest)
smallest=y;

if(z>smallest)
smallest=z;

return smallest;
}


ما أدري هل من الممكن كتابة البرنامج بهذا الشكل ؟؟

لأني استخدمت دالة ( إيجاد الرقم الأصغر ) بين مجموعة أعداد محددة

و أتوقع أنهم يبغون كتابته بدون استخدام أي دالة .. و حتى إذا كان قصدهم كذا

ممكن تستخدمين الكود التالي :

#include<iostream.h>
#include<conio.h>

main()
{
clrscr();


int value_1;
int value_2;
int value_3;

cout<<"\n Enter the value_1 = ";
cin>>value_1;

cout<<"\n Enter the value_2 = ";
cin>>value_2;

cout<<"\n Enter the value_3 = ";
cin>>value_3;

if((value_1 < value_2) && (value_1 < value_3))
cout<<"\n The smallest integer is = "<<value_1<<endl;

else if((value_2 < value_1) && (value_2 < value_3))
cout<<"\n The smallest integer is = "<<value_2<<endl;

else
cout<<"\n The smallest integer is = "<<value_3<<endl;

getch();
return 0;
}









و الحقيقة حذفت الـ Compiler الخاص بلغة ++C من جهازي

و إلا كان أفدتك أكثر .. و كتبت لك بقية البرامج كاملة

موفقة ،،
ام سرمد
ام سرمد
شكرا على مساعدتك يالغاليه:26: