InstagramTwitterSnapChat


 
وصف

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


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

برمجة 202 - الله يخليكم ساعدوني مو فااااااهمة المسألة مزبوط ..؟!

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

 
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 12-10-2012, 02:08 AM   #6

عاشق الحاسب

جامعي

الصورة الرمزية عاشق الحاسب

 
تاريخ التسجيل: May 2008
التخصص: علوم الحاسب
نوع الدراسة: ماجستير
المستوى: متخرج
الجنس: ذكر
المشاركات: 42
افتراضي رد: الله يخليكم ساعدوني مو فااااااهمة

هذا تقريبا اجتهادي في حل الفقرة الاولي من سوال الاخت مستجدة
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package javaapplication2;
import java.util.Scanner;

/
*
* @author ahmed ali
*/
public class JavaApplication2 {

/
* @param args the command line arguments
*/
public static void main(String[] args) {
final int COVERAGE = 350; //paint covers 350 sq ft/gal
int length, width,height; //declare integers length, width, and height;
double totalSqFt; //declare double totalSqFt;
double paintNeeded; //declare double paintNeeded;
Scanner sc = new Scanner(System.in);

System.out.println( "Please enter the length of the room: " );
length = sc.nextInt();

System.out.println( "Please enter the width of the room: " );
width = sc.nextInt();

System.out.println( "Please enter the height of the room: " );
height = sc.nextInt();

totalSqFt=(2*length*height)+ (2*width*height);//Compute the total square feet to be painted

paintNeeded= totalSqFt / COVERAGE;//Compute the amount of paint needed

System.out.printf("\nThe length of the room is %d",length);
System.out.printf("\nnThe width of the room is %d",width);
System.out.printf("\nThe height of the room is %d",height);

System.out.printf("\nThe number of gallons of paint needed is %f",paintNeeded," gallons. \n");
paintNeeded= Math.ceil(paintNeeded);
System.out.printf(" so you have to purchase %f",paintNeeded," gallons. \n");
}
}

 

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

 


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

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

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

 


الساعة الآن 11:53 AM


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