InstagramTwitterSnapChat


 
وصف

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


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

ياليت احد يساعدني في الشيت

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

إضافة رد
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 19-04-2012, 10:19 PM
الصورة الرمزية ميم 28

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

Amerah

 
تاريخ التسجيل: Sep 2010
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 192
افتراضي ياليت احد يساعدني في الشيت


من العنوان ابغى احد يساعدني في الشيت ضروري

. Write a Java program that will read words from the keyboard until the word doneis entered. For each word except done, report whether its first character is equal to its last character. For the required loop, use a
a. while statement
b. do-while statement

2. Convert the following code so that it uses nested while statements instead of for statements:

int s = 0;
int t = 1;
for (int i = 0; i < 10; i++)
{
s = s + i;
for (int j = i; j > 0; j--)
{
t = t * (j - i);
}
s = s * t;
System.out.println(“T is “ + t);
}
System.out.println(“S is “ + s);

. Suppose that you work for a beverage company. The company wants to know the optimal cost for a cylindrical container that holds a specified volume. Write a fragment of code that uses an ask-before-iterating loop. During each iteration of the loop, your code will ask the user to enter the volume and the radius of the cylinder. Compute and display the height and cost of the container. Use the following formulas, where V is the volume, r is the radius, h is the height, and C is the cost.


4. What does the following fragment of code display? What do you think the programmer intended the code to do, and how would you fix it?
int product = 1;
int max = 20;
for (int i = 0; i <= max; i++)
product = product * i;
System.out.println(“The product is “ + product);

. What does the following fragment of code display? What do you think the programmer intended the code to do, and how would you fix it?
int sum = 0;
int product = 1;
int max = 20;
for (int i = 1; i <= max; i++)
sum = sum + i;
product = product * i;
System.out.println(“The sum is “ + sum +
“ and the product is “ + product);

6. Write a for statement to compute the sum 1 + 22+ 32+ 42+ 52+ ... + n2.

7. (Optional) Repeat the previous question, but use the comma operator and omit the for statement’s body.


8. Suppose that we want to compute the geometric mean of a list of positive values. To compute the geometric mean of k values, multiply them all together and then compute the kth root of the value. For example, the geometric mean of 2, 5, and 7 is . Use a loop with a sentinel value to allow a user to enter an arbitrary number of values. Compute and display the geometric mean of all the values, excluding the sentinel. (Hint: Math.pow(x, 1.0 / k) will compute the kth root of x.


ياليت احد يساعدني وشكراا


رد مع اقتباس

 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 20-04-2012, 01:09 AM   #2

الماسة 6

جامعي

 
تاريخ التسجيل: Dec 2011
التخصص: حاسب
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 95
افتراضي رد: ياليت احد يساعدني في الشيت

ياليت احدد يساعدناا لانه ضروري نسلمهااا

 

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

إضافة رد


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

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

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

 


الساعة الآن 06:25 PM


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

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

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

2003-2023