InstagramTwitterSnapChat


 
وصف

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


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

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

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

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

Mr.Ahmad Mr.Ahmad غير متواجد حالياً

عضو هيئة تدريس

 
تاريخ التسجيل: Jul 2008
الكلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: جــــدة
الجنس: ذكر
المشاركات: 2,477
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد


المشاركة الأصلية كتبت بواسطة master foxy مشاهدة المشاركة
السلام عليكم عندي واجب في المعمل وما اعرف المطلوب وطريقة الحل
السؤال
1. Write a program that gets the ID (as integer), gender (as character), and temperature (as double) from the user. Then, display the values of the three variables using one printf statement?
الحل : ( شرح مبسط موجود داخل الكود كتعليقات )



النتيجة :



إن لم تفهم أي نقطة ,, أخبرني لكي نشرحها بالتفصيل .

 


توقيع Mr.Ahmad  

سبحان الله وبحمد ,,, سبحان الله العظيم
الحمد لله كما ينبغي لجلال وجهه وعظيم سلطانه .
اللهم صل على محمد وعلى آل محمد كما صليت على إبراهيم وعلى آل إبراهيم إنك حميد مجيد . اللهم بارك على محمد وعلى آل محمد كما باركت على إبراهيم وعلى آل إبراهيم إنك حميد مجيد.

 

رد مع اقتباس

 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 18-10-2010, 06:23 AM   #2

سيسيليفينيا

اسْتَغفِراللَّه

الصورة الرمزية سيسيليفينيا

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

المشاركة الأصلية كتبت بواسطة Mr.Ahmad مشاهدة المشاركة
الحل : ( شرح مبسط موجود داخل الكود كتعليقات )




.
اخ أحمد في ذا السؤال يبغاها في printf وحده ليه انت حليتها في اكثر من برنت
انا جربت احلها في برنت وحده بس المشكله في نوع الجنس مايطلع
ذا الكود اللي سويتو
كود PHP:
#include<stdio.h>
#include<conio.h>
main()
{
int ID;
char gender ;
double Temperature ;
printf("Enter your ID\nEnter your gender ('M' for mail And 'F' for femail)\nEnter the Temperature");
scanf(" %d%c%lf",&ID,&gender,&Temperature);
printf("your ID is %d \nyour gender is %c\n The temperature is %lf ",ID,gender,Temperature);
getch();

 

توقيع سيسيليفينيا  

 

سبحان الله وبحمده , سبحان الله العظيم


♥♥Seselvenia♥♥

 

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

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 18-10-2010, 06:30 AM   #3

Mr.Ahmad

عضو هيئة تدريس

الصورة الرمزية Mr.Ahmad

 
تاريخ التسجيل: Jul 2008
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: جــــدة
الجنس: ذكر
المشاركات: 2,477
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

المشاركة الأصلية كتبت بواسطة سيسيليفينيا مشاهدة المشاركة
اخ أحمد في ذا السؤال يبغاها في printf وحده ليه انت حليتها في اكثر من برنت
انا جربت احلها في برنت وحده بس المشكله في نوع الجنس مايطلع
ذا الكود اللي سويتو
كود PHP:
#include<stdio.h>
#include<conio.h>
main()
{
int ID;
char gender ;
double Temperature ;
printf("Enter your ID\nEnter your gender ('M' for mail And 'F' for femail)\nEnter the Temperature");
scanf(" %d%c%lf",&ID,&gender,&Temperature);
printf("your ID is %d \nyour gender is %c\n The temperature is %lf ",ID,gender,Temperature);
getch();

وضعتها في أكثر من طباعة علشان تزين شكل المخرجات لا أكثر .

وبالنسبة لكودك ,,, المفروض كنت تضع مسافة قبل كتابة %c ,, أي عدل جملة الـ scanf إلى :
كود:
 
scanf("%d %c%lf",&ID,&gender,&Temperature);
بالتوفيق .

 

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

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 18-10-2010, 10:09 PM   #4

سيسيليفينيا

اسْتَغفِراللَّه

الصورة الرمزية سيسيليفينيا

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

المشاركة الأصلية كتبت بواسطة Mr.Ahmad;

وبالنسبة لكودك ,,, المفروض كنت تضع مسافة قبل كتابة %c ,, أي عدل جملة الـ scanf إلى :
[FONT=Consolas
كود:

scanf("%d %c%lf",&ID,&gender,&Temperature);
بالتوفيق .
[/FONT]

يعني في d% , %c اخلي مسافه و f% عادي مااخلي مسافه

 

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

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 19-10-2009, 04:30 PM   #5

أحـمـد ظـافـر

مشرف مُتألق سابق

الصورة الرمزية أحـمـد ظـافـر

 
تاريخ التسجيل: Oct 2008
كلية: كلية الهندسة
التخصص: مدنيّة
نوع الدراسة: إنتظام
المستوى: الرابع
البلد: الدول العربية
الجنس: ذكر
المشاركات: 2,472
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

أحمد


الله يجزاك الجنة ؟.,


سؤالي هو في ملف الــ handout-01 اللي اعطانا هوه الدكترو <<< واااجب صــ15 و 16

Lab 1.1: Your First Java Program
In this lab, you will write a Java program that uses the System.
out.prinlnt() method to display an email signature (name, title, email
address, and so forth).
Perform the following steps:
1. Create a new subdirectory in your javafiles directory, called Lab1_1.
2. Using your editor, start with a public class called Signature.
Add the main() method within the Signature class.
3. Within main(), use the System.out.println() method to print your
name at the command prompt.
4. Similarly, print your title on a line, then your email address, Web
site URL, or phone numbers. (Display any information you want in
your signature. Just remember to use a semicolon after each
println() statement.)
5. Save your Signature source code in the Lab1_1 folder in a file called
Signature.java.
6. Compile Signature.java using the javac tool.
7. Run the Signature program using the java tool.
You should see an output similar to that in Figure 1.10.



--------------------

Lab 1.2: Using Command-Line Arguments
When you run a Java program from the command prompt, you can input
arguments that get passed to the main() method as strings. For example,
suppose that you entered the following command to run your Signature
program from Lab 1.1:
java Signature hello 27 “Rich Raposa”
This command has three command-line arguments beyond the java
Signature command: hello, 27, and Rich Raposa. (Arguments are separated
by spaces unless placed in double quotes.) These three arguments
are passed into main() and placed in the args parameter. The args parameter
is an array of strings that can hold as many command-line arguments
as you enter.
To access these arguments within main(), you use args with a sub
in square brackets. For example, args[0] is the first argument, args[1] is
the second, and so on. In the current example, args[0] will be the string
“hello,” args[1] will be “27,” and args[2] will be “Rich Raposa.”
In this lab, you will display the title and author of a book, where the
title and author are entered as command-line arguments such as:
Title: Green Eggs and Ham
Author: Dr. Seuss
Now, follow these steps:
1. Create a new subdirectory of javafiles, called Lab1_2.
2. Open your editor, and write a public class called Book.
3. Add main() within your Book class.
4. The title will be args[0] and the author will be args[1]. You need to
concatenate “Title: “ with args[0], which is done by using the + operator.
For example:
System.out.println(“Title: “ + args[0]);
5. Similarly, use the concatenation operator to display “Author: “ and
args[1].
6. Save your Book class in the Lab1_2 directory in a file called
Book.java.
16 Chapter 1
7. Compile the Book class.
8. Run the Book program, using two command-line arguments:
java Book “Green Eggs and Ham” “Dr. Seuss”
If

____________

اذا تقدرون تفيدوني الله يعطيكم الف عافيــة .,÷‘إ

 

 

لا تنس #أذكار_الصباح
لا تنس #أذكار_المساء
استغفر الله العظيم الذي لا إله إلا هو الحي القيوم وأتوب إليه.
اللهم صل على محمد وعلى آله وأصحابه والتابعين.
اللهُمَّ إرحم موتَانآ وموتـــــَى المُسلِمينْ والمُسلِمآتْ
اللهُمَّ قِهمْ عذَابَ القـــَبْر وفِتنَته.

اللهُمَّ إٍنَّا نسألُكَ حُسنَ الخَاتِمة .

 

أحـمـد ظـافـر غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 19-10-2009, 10:53 PM   #6

Mr.Ahmad

عضو هيئة تدريس

الصورة الرمزية Mr.Ahmad

 
تاريخ التسجيل: Jul 2008
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: جــــدة
الجنس: ذكر
المشاركات: 2,477
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

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


الله يجزاك الجنة ؟.,


سؤالي هو في ملف الــ handout-01 اللي اعطانا هوه الدكترو <<< واااجب صــ15 و 16

lab 1.1: Your first java program
in this lab, you will write a java program that uses the system.
out.prinlnt() method to display an email signature (name, title, email
address, and so forth).
perform the following steps:
1. Create a new subdirectory in your javafiles directory, called lab1_1.
2. Using your editor, start with a public class called signature.
add the main() method within the signature class.
3. Within main(), use the system.out.println() method to print your
name at the command prompt.
4. Similarly, print your title on a line, then your email address, web
site url, or phone numbers. (display any information you want in
your signature. Just remember to use a semicolon after each
println() statement.)
5. Save your signature source code in the lab1_1 folder in a file called
signature.java.
6. Compile signature.java using the javac tool.
7. Run the signature program using the java tool.
you should see an output similar to that in figure 1.10.



--------------------

lab 1.2: Using command-line arguments
when you run a java program from the command prompt, you can input
arguments that get passed to the main() method as strings. For example,
suppose that you entered the following command to run your signature
program from lab 1.1:
java signature hello 27 “rich raposa”
this command has three command-line arguments beyond the java
signature command: Hello, 27, and rich raposa. (arguments are separated
by spaces unless placed in double quotes.) these three arguments
are passed into main() and placed in the args parameter. The args parameter
is an array of strings that can hold as many command-line arguments
as you enter.
to access these arguments within main(), you use args with a sub
in square brackets. For example, args[0] is the first argument, args[1] is
the second, and so on. In the current example, args[0] will be the string
“hello,” args[1] will be “27,” and args[2] will be “rich raposa.”
in this lab, you will display the title and author of a book, where the
title and author are entered as command-line arguments such as:
title: Green eggs and ham
author: Dr. Seuss
now, follow these steps:
1. Create a new subdirectory of javafiles, called lab1_2.
2. Open your editor, and write a public class called book.
3. Add main() within your book class.
4. The title will be args[0] and the author will be args[1]. You need to
concatenate “title: “ with args[0], which is done by using the + operator.
for example:
system.out.println(“title: “ + args[0]);
5. Similarly, use the concatenation operator to display “author: “ and
args[1].
6. Save your book class in the lab1_2 directory in a file called
book.java.
16 chapter 1
7. Compile the book class.
8. Run the book program, using two command-line arguments:
java book “green eggs and ham” “dr. Seuss”
if

____________

اذا تقدرون تفيدوني الله يعطيكم الف عافيــة .,÷‘إ
حياك الله .
هذه المادة يبدوا أنها cpcs 203 البرمجة بلغة الجافا .
ولكن لا مانع ,, سأحاول حل السؤال بما لدي من معلومات حول هذه اللغة ( الجافا ) .
يؤجل حتى يتم حل الأسئلة البقية المتعلقة بـ cpsc 202 .

 

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

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 20-10-2009, 05:20 PM   #7

أحـمـد ظـافـر

مشرف مُتألق سابق

الصورة الرمزية أحـمـد ظـافـر

 
تاريخ التسجيل: Oct 2008
كلية: كلية الهندسة
التخصص: مدنيّة
نوع الدراسة: إنتظام
المستوى: الرابع
البلد: الدول العربية
الجنس: ذكر
المشاركات: 2,472
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

المشاركة الأصلية كتبت بواسطة mr.ahmad مشاهدة المشاركة
حياك الله .
هذه المادة يبدوا أنها cpcs 203 البرمجة بلغة الجافا .
ولكن لا مانع ,, سأحاول حل السؤال بما لدي من معلومات حول هذه اللغة ( الجافا ) .
يؤجل حتى يتم حل الأسئلة البقية المتعلقة بـ cpsc 202 .

أحمد يعطيك العافية .,’

هذي معانا في الماده اعطانا هيه الدكتوور هوم ورك ؟,’×÷‘

 

أحـمـد ظـافـر غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 19-10-2009, 11:44 PM   #8

Mr.Ahmad

عضو هيئة تدريس

الصورة الرمزية Mr.Ahmad

 
تاريخ التسجيل: Jul 2008
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: جــــدة
الجنس: ذكر
المشاركات: 2,477
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

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


الله يجزاك الجنة ؟.,


سؤالي هو في ملف الــ handout-01 اللي اعطانا هوه الدكترو <<< واااجب صــ15 و 16

Lab 1.1: Your First Java Program
In this lab, you will write a Java program that uses the System.
out.prinlnt() method to display an email signature (name, title, email
address, and so forth).
Perform the following steps:
1. Create a new subdirectory in your javafiles directory, called Lab1_1.
2. Using your editor, start with a public class called Signature.
Add the main() method within the Signature class.
3. Within main(), use the System.out.println() method to print your
name at the command prompt.
4. Similarly, print your title on a line, then your email address, Web
site URL, or phone numbers. (Display any information you want in
your signature. Just remember to use a semicolon after each
println() statement.)
5. Save your Signature source code in the Lab1_1 folder in a file called
Signature.java.
6. Compile Signature.java using the javac tool.
7. Run the Signature program using the java tool.
You should see an output similar to that in Figure 1.10.



--------------------

Lab 1.2: Using Command-Line Arguments
When you run a Java program from the command prompt, you can input
arguments that get passed to the main() method as strings. For example,
suppose that you entered the following command to run your Signature
program from Lab 1.1:
java Signature hello 27 “Rich Raposa”
This command has three command-line arguments beyond the java
Signature command: hello, 27, and Rich Raposa. (Arguments are separated
by spaces unless placed in double quotes.) These three arguments
are passed into main() and placed in the args parameter. The args parameter
is an array of strings that can hold as many command-line arguments
as you enter.
To access these arguments within main(), you use args with a sub
in square brackets. For example, args[0] is the first argument, args[1] is
the second, and so on. In the current example, args[0] will be the string
“hello,” args[1] will be “27,” and args[2] will be “Rich Raposa.”
In this lab, you will display the title and author of a book, where the
title and author are entered as command-line arguments such as:
Title: Green Eggs and Ham
Author: Dr. Seuss
Now, follow these steps:
1. Create a new subdirectory of javafiles, called Lab1_2.
2. Open your editor, and write a public class called Book.
3. Add main() within your Book class.
4. The title will be args[0] and the author will be args[1]. You need to
concatenate “Title: “ with args[0], which is done by using the + operator.
For example:
System.out.println(“Title: “ + args[0]);
5. Similarly, use the concatenation operator to display “Author: “ and
args[1].
6. Save your Book class in the Lab1_2 directory in a file called
Book.java.
16 Chapter 1
7. Compile the Book class.
8. Run the Book program, using two command-line arguments:
java Book “Green Eggs and Ham” “Dr. Seuss”
If

____________

اذا تقدرون تفيدوني الله يعطيكم الف عافيــة .,÷‘إ
بخصوص السؤال الأول : تنشئ مشروج جديد ،، ثم تكمل كما في الصور :




أنا هنا قمت بتسمية الكلاس باسم LAB1_1 ولكن أنت سميه Signature كما هو مطلوب في السؤال .










هذه طريقة السؤال الأول ...

بخصوص السؤال الثاني : يطلب منك استخدام مصفوفة args الموجود في الطريقة main لعرض عدة أسماء أو شيء نصي مع جملة .
مثال :



بالتوفيق .

 


التعديل الأخير تم بواسطة Mr.Ahmad ; 19-10-2009 الساعة 11:47 PM.
Mr.Ahmad غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 19-10-2009, 06:07 PM   #9

زهرة البنفسج

مراقبة سابقاً

الصورة الرمزية زهرة البنفسج

 
تاريخ التسجيل: Jan 2009
التخصص: Computer Science
نوع الدراسة: إنتظام
المستوى: التاسع
الجنس: أنثى
المشاركات: 1,458
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

شكراً على المساعدة؟؟؟؟؟؟؟؟؟؟؟؟و هل الأخطاء هي بس :
syntax error
logic problem و لا لسه في باقي أنواع للأخطاء .......الرجاء إفادتي

 

توقيع زهرة البنفسج  

 

 

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

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 19-10-2009, 07:47 PM   #10

master foxy

جامعي

الصورة الرمزية master foxy

 
تاريخ التسجيل: Jun 2009
التخصص: IT
نوع الدراسة: إنتظام
المستوى: الرابع
الجنس: ذكر
المشاركات: 77
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

السلام عليكم استاذ احمد
إذا مافهمت سؤالي الموضوع هذا
http://www.skaau.com/vb/showthread.php?t=113568
الى حضرتك منزله موجود في اخر سلايد homework وهذا المطلوب يعطيك العافيه

 


التعديل الأخير تم بواسطة master foxy ; 19-10-2009 الساعة 09:34 PM.
master foxy غير متواجد حالياً   رد مع اقتباس
 

إضافة رد


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

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

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

 


الساعة الآن 01:57 AM


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