Write acomplite C++ aprogram to do the follwing:
1- define the follwing variables:
A- three integer number (A,B,X)
B- two double numbers (F,M)
C- two charcters variables(ch1 , ch2)
D- two string variables(S1 ,S2)
S1 20 charcter ــــ
S2 20 charctersـــــــ
Let S1 = "dalal"
Let S2 = "rashed"
2- input the values of (X-A-B-Ch1-Ch2) that you have Defind them.
3- calculate the follwing equations F=(S ............+√X)\R ..............
..............................................................( i=1-5 ) ................... ( i=1-3)
هُنآ أعني أن s
قيمتها i
التي تسآوي من 1 ألى خمسه وكذلك قيمة
r
M=f*log e10
4- test the value of F as the following:
1- if(F>=M) F=m+s
2- if ( F eqwal m) then F=0; m=0
3- if (less than m) then F=m
5- test the valule of A as the follwing:
1- if (A eqwal 10) than B=A+F
2- if (A eqwal 12) then B=F
3- other wise A=m
B=F
Ch1=ch2
6- calculate the average of S and R and find A1=R\S
7- print the follwing report:
Northem Bonder Univarstiy
Computer of Department
1- the values of elements:
A=..... B=.... X=....
Ch1= ..... Ch2=......
2- the results are:
F= ...... M=......
A1=......
Theresarcher
dalal rashed
أشيروآ علي هل هُنآك أخطآء
بهذا الحل
^^^
#include<iostream>
Include<cmath>
Int main ()
{
int a,b,x.i;
هُنآ عرفت
i
لاني راح استخدمه بجمل اللوب
double f,m;
char ch1,ch2;
string s1,s2;
s1[20]="dalal" s2[20]="rashed"
هنآآ أدخلت سعة المتغيرات بين أقوآس لا أدري أهي مطلوب أم هي للافاده فقط
x=10,a=20,b=30,ch1=p,ch2=q;
هنآآآ أدخلت قيم أفتراضيه !!
for(i=1;i<=5;i++)
}
int s;
intr r;
s=10;
r=15;
وهنآآ أيضآ أفترضت قيم لا ادري هل يشترط الافتراض والتعريف أم لا
s=s+i
r=r+i
f=(s=sqrt(x)/r)
}
m=f*log10(x) exp(x);
هذه الجمله وضعتها بعد اللوب :(
[/
color]
يتبقى حل الكثيير لي عوده :(
