InstagramTwitterSnapChat


 
وصف

العودة   منتديات سكاو > الكليات الجامعية > منتدى كلية الحاسبات وتقنية المعلومات > المنتدى العام لكلية الحاسبات وتقنية المعلومات
   
   


المنتدى العام لكلية الحاسبات وتقنية المعلومات قسم خاص بالمواد العامة و الطلاب غير المتخصصين بكلية الحاسبات وتقنية المعلومات

هنا حل الــ Final Lab }..

المنتدى العام لكلية الحاسبات وتقنية المعلومات

 
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 24-12-2011, 03:15 PM
الصورة الرمزية 6flah

6flah 6flah غير متواجد حالياً

ومآ توفيقي إلا بالله}..

 
تاريخ التسجيل: Mar 2011
التخصص: فريندس ناو , اوذرز نت ماتر ^.*
نوع الدراسة: ثانوي
المستوى: الخامس
الجنس: أنثى
المشاركات: 938
Lightbulb هنا حل الــ Final Lab }..


السلام عليكم ورحمة الله وبركاته ..

كيف حالكم وكيف صداع وهم الامتحانات نقرتين لعرض الصورة في صفحة مستقلة ,,

هذا هو موفقات جميعا نقرتين لعرض الصورة في صفحة مستقلة>> كل فيساتهم ذكورية^^"

كود:
   package finalExam;
    import java.util.Scanner;
    
    publicclass FinalExam {
    
    /6FLAH
  
  
           *
           *
           *Final Exam 
           *
           *DC
           *
           *
           *
           *23/12/2011
           *
           *This program to let the user 
           *choose on of the operation from 
           *the menue  then it will be executeed
           * then desply the answer on the screen 
           */
    publicstaticvoid main(String[] args) {
    
                Scanner in=new Scanner(System.in);
                System.out.println("1-Factorial\n2-Addition\n3-Minimum\n4-Square Root\n5-Multiplication Table\n ");
                String answer;
    int counter1;
    int product;
    int first;
    int second;
    int sum;
    int first2;
    int second2;
    int smallest;
    int number;
    int number2;
    int counter2;
    
    do{System.out.print("Enter your choice:");
    int choice=in.nextInt();
    while((choice!=1)&&(choice!=2)&&(choice!=3)&&(choice!=4)&&(choice!=5))
    
                {
                      System.out.print(" Wrong answer ...........Enter again:");
                      choice=in.nextInt();
    
    
                }
    
    switch (choice){
    
    case 1:{System.out.print("Enter the number to find the factorial for: ");
    int numberForFactorial=in.nextInt();
                             counter1=1;
                             product=1;
    for(counter1=1;counter1<=numberForFactorial;counter1++){
                            product*=counter1;}
                      {System.out.println("Factorial of "+numberForFactorial+" ="+product);
    
                      }
    break;}
    
    case 2:{
    
                                  {System.out.print("Enter first number:");
                                  first=in.nextInt();
    
                                  System.out.print("Enter second number:");
                                   second =in.nextInt();
    
                                   sum=first+second;
    
    
    
                                  System.out.println("The sum of "+first+" and "+second+" is "+sum);}
    
    break;}
    
    case 3:{
                                        System.out.print("Enter first number:");
                                  first2=in.nextInt();
    
                                  System.out.print("Enter second  number:");
                                  second2=in.nextInt();
    
    if(first2<second2){smallest=first2;}
    else{smallest=second2;}
    
                                  System.out.println("The smallest number of the two entered\nnumbers, "+first2+", "+second2+" is "+smallest);
    
    
    
    break;}
    
    
    
    
    case 4:{
                            System.out.print("Enter the number:");
                            number=in.nextInt();
                            System.out.println("The square root of "+number+" = "+Math.sqrt(number));
    
    
    break;}
    
    
    case 5:
                      {
                            System.out.print("The \'Multiplication Table\'of which\nnumber would you like to display?");
                      number2=in.nextInt();
    
    for(counter2=1;counter2<=10;counter2++)
    
                      {System.out.print(number2+" * "+counter2+" = "+(number2*counter2)+"\n");
    
    
    
                      }
                      System.out.println();
    break;}
    
                }
    
    
    
    
    
                System.out.print("Do you want to continue? (Yes/No):");     
                 answer=in.next();
    
                }while(answer.equalsIgnoreCase("yes"));
    
                System.out.println("Thanks for using my program");
    
          }
    
    }

 


توقيع 6flah  

اللهم باآآآآآآآآآرك لنا في شآآآمنا و يمنناآآ !!

 

رد مع اقتباس

 

 

أدوات الموضوع إبحث في الموضوع
إبحث في الموضوع:

البحث المتقدم
انواع عرض الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

 


الساعة الآن 11:49 PM


Powered by vBulletin® Version 3.8.9 Beta 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Ads Organizer 3.0.3 by Analytics - Distance Education

أن كل ما ينشر في المنتدى لا يمثل رأي الإدارة وانما يمثل رأي أصحابها

جميع الحقوق محفوظة لشبكة سكاو

2003-2025