عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 19-02-2011, 09:54 PM

عادل محمد البسامي عادل محمد البسامي غير متواجد حالياً

جامعي

 
تاريخ التسجيل: Nov 2010
التخصص: هندسة
نوع الدراسة: تأهيلي
المستوى: الأول
الجنس: ذكر
المشاركات: 16
افتراضي رد: ابي مساعدتكم في اسئلة الواجب للجافا لاتروودني


المشاركة الأصلية كتبت بواسطة هلالية موووت مشاهدة المشاركة

السلام عليكم
كيفكم ان شا الله الجميع بخير؟؟
انا جاية من جامعة ام القرى <<جارتكم يعني الله الله فيني
المهم ماابي اطول عليكم
انا ابي مساعدتكم في حل اسئلة الواجب لانها مطلوبة بكرة اسلمها على الموقع جسور

يوجد على ملف وورد في المرفقات لانه السؤال الاول محتاج flowchart رسم خوارزمي


Homework 2



1. Three memory locations A, B, and C contain numbers. Write
down the algorithm for finding and printing the smallest
number
a. using pseudocode
b. using flowchart
Input of the algorithm: Memory locations A, B, and C.
Output of the algorithm: print the contents of the memory
location that contains the smallest number.




2. Write an if statement to complete the following program. If
the user's input (answer) is 13, then the program should
output the message "Correct"; otherwise, the program
should output the message "Wrong".
public class Greet {
public static void main(String[] args) {
int answer;
System.out.print("What is 5 + 8 ? ");
answer = TextIO.getlnInt();
}
}


3. Identify and correct the errors in each of the following
statements:
a. if ( c < 7 );
System.out.println( “c is less than 7” );
b. if ( c => 7 )

System.out.println( “c is equal to or grearer than 7” );


والله يوفق اللي يرد عليه لاني مودارية عنه الا الحين ولازم اسلمه بكرة 23/11
تكفون لاتردوني
-----------------------------
السؤال الاول
a=x[0];
b=x[1];
c=x[2];
smallest=x[0];
for(i=1;i<3;i++)
{
if(x[i]<smallest) smallest=x[i];
else;
}
------------
الثاني
scanf("%d",&x);
if(x==13) cout<<"Correct"
else cout<<"Wrong"
----
بالنسبة للثالث ِ هو الخطاء
لا تضع السيماكولن بعد اففففففففف
a. if ( c < 7 );
خطا
a. if ( c < 7 )
صح


التعديل الأخير تم بواسطة عادل محمد البسامي ; 19-02-2011 الساعة 09:57 PM.
رد مع اقتباس