قناة سكاو في الواتساب
 


حسابنا في السناب شاتحسابنا في منصة Xقناتنا في اليوتيوبحسابنا في التيك توكقناتنا في التيليجرامقناة سكاو في الواتساب
 
وصف

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


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

[cpcs 202 - برمجة 1] لديك سؤال , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

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

 
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 16-11-2013, 07:44 PM   #30

ميج حمدان

لا حولَ ولا قوة الا بالله

الصورة الرمزية ميج حمدان

 
تاريخ التسجيل: Sep 2013
التخصص: حاسب آلي
نوع الدراسة: إنتظام
المستوى: الأول
الجنس: أنثى
المشاركات: 11
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

ممكن مساعدة في حل Activities الي تتكلم عن if لاني مو مستوعبتها مرة :"(

Activity1: Assume that x is 1, show the result of the following Boolean expressions as true or false:


!(x > 0) && (x > 0)
(x > 0) || (x < 0)
(x != 0) || (x == 0)
(x >= 0) || (x < 0)
(x != 1) == !(x == 1)

Activity2: Write a Boolean expression that evaluates to true if a number stored in variable num is between 1 and 100.


Activity3: (a) Write an if statement that increases pay by 3% if score is greater than 90.

(b) Write an if statement that increases pay by 3% if score is greater than 90, otherwise increases pay by 1%.


Activity 5: Use application Grade for Exercises 1, 2, and 3.

// Application Grade prints appropriate messages on System.out
// based on a grade read from the keyboard
import java.util.Scanner;
public class Grade
{
public static void main(String[] args)
{
int grade;
Scanner inData = new Scanner(System.in):
System.out.println("Key in an integer grade. ");
grade = inData.nextInt();
if
// TO BE FILLED IN

}
}

Exercise 1: When completed, application Grade reads an integer value and writes an appropriate message on System.out. Complete the if statement so that “Congratulations!” is written if the numeric grade is greater than or equal to 80. Run the program five times entering the following values for grade: 60, 100, 80, 81, and 79.
“Congratulations!” is printed ___________ time(s) in the five runs.
Exercise 2: Change the Boolean expression in Exercise 1 so that “Try harder” is printed if the numeric grade is less than 70. Run the program with the same data listed for Exercise 1.
“Try harder” is printed ___________ time(s) in the five runs.
Exercise 3: Change the Boolean expression so that “Average” is printed if the numeric grade is less than 80 but greater than 70. Run the program with the same data listed for Exercise 1.
“Average” is printed___________ time(s) in the five runs.

 

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

 

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

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

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

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

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

 


الساعة الآن 05:19 PM


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

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

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

2003-2025