InstagramTwitterSnapChat


 
وصف

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


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

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

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

إضافة رد
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 30-12-2010, 05:01 PM
الصورة الرمزية dldoll

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

جامعي

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


Write a program that reads numbers of students(max 30), then store the student ID (serial numbers start from 1, you must fill it) ,and read from user: mid exam and final exam marks all store in arrays such as:
1
2
3
4
5
6
40
30
40
39
10
15
60
30
39
20
48
44
No. of employee = 6
id mid(max40) final(max 60)



100
60
79
59
58
59
2. And then create another array to store total marks for each student(you will fill it total=mid+final)
100
60
79
60
60
60

3. check if some students get 57,58,59, modify it to 60.
4. Print id and total arrays after modify like bellow example:

5. Using the following functions implement the program:
· Void get_data(int i[],int m[], int f[],int t[],nt no);
//no=length of the arrays
// to fill Id and total, read mid and final from the user .
· Void check_total( int t[],int no);
//to check if the total =57 or 58 or 59, then total =60
· Void display(int i[], int t[],int no);
// print id and total values .

Output:

How many student you have:6
Enter mid and final for s1:40 60
Enter mid and final for s2:30 30
Enter mid and final for s3:40 39
Enter mid and final for s4:39 20
Enter mid and final for s5:10 48
Enter mid and final for s6 44
ID
total
1
100
2
60
3
79
4
60
5
60
6
60



مستر احمد عارفه اني ططفشتك
التسليم يوم السبت و احتاج احله بلييييييز
رد مع اقتباس

 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 31-12-2010, 09:48 PM   #2

Mr.Ahmad

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

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

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

المشاركة الأصلية كتبت بواسطة dldoll مشاهدة المشاركة
Write a program that reads numbers of students(max 30), then store the student ID (serial numbers start from 1, you must fill it) ,and read from user: mid exam and final exam marks all store in arrays such as:
1
2
3
4
5
6
40
30
40
39
10
15
60
30
39
20
48
44
No. of employee = 6
id mid(max40) final(max 60)



100
60
79
59
58
59
2. And then create another array to store total marks for each student(you will fill it total=mid+final)
100
60
79
60
60
60

3. check if some students get 57,58,59, modify it to 60.
4. Print id and total arrays after modify like bellow example:

5. Using the following functions implement the program:
· Void get_data(int i[],int m[], int f[],int t[],nt no);
//no=length of the arrays
// to fill Id and total, read mid and final from the user .
· Void check_total( int t[],int no);
//to check if the total =57 or 58 or 59, then total =60
· Void display(int i[], int t[],int no);
// print id and total values .

Output:

How many student you have:6
Enter mid and final for s1:40 60
Enter mid and final for s2:30 30
Enter mid and final for s3:40 39
Enter mid and final for s4:39 20
Enter mid and final for s5:10 48
Enter mid and final for s6 44
ID
total
1
100
2
60
3
79
4
60
5
60
6
60



مستر احمد عارفه اني ططفشتك
التسليم يوم السبت و احتاج احله بلييييييز
كود PHP:

#include<stdio.h>
#include<conio.h>

void get_data(int i[],int m[], int f[],int t[],int no)
{
 
int k;
 for (
0nok++)
 {
  
printf("Enter mid and final for s%d : "i[k]);
  
scanf("%d %d", &m[k], &f[k]);
  
t[k] = m[k] + f[k];
 }
}
void check_totalint t[],int no)
{
 
int i;
 for (
0noi++)
 {
  if (
t[i] == 57 || t[i] == 58 || t[i] == 59)
  {
   
t[i] = 60;
  }
 }
}
void display(int i[], int t[],int no)
{
 
int k;
 
printf("Total :\n");
 for (
0nok++)
 {
  
printf("ID s%d : %d \n",i[k], t[k]);
 }
}
int main ()
{
 
int i,size,id[30], mid[30], final[30], total[30];
 
printf("How many student you have : ");
 
scanf("%d",&size);
 
//Set ID Number
 
for (0sizei++)  id[i] = 1;
 
//call Function get_data
 
get_data(idmid, final, total,size);
 
//call Function check_total
 
check_total(totalsize);
 
//call Function display
 
display(id,total,size);
 
getch();
 return 
0;

 

توقيع Mr.Ahmad  

 

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

 

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

إضافة رد


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

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

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

 


الساعة الآن 04:08 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