عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 26-01-2011, 06:40 AM

x.TariQ.x x.TariQ.x غير متواجد حالياً

جامعي

 
تاريخ التسجيل: Jan 2011
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: ذكر
المشاركات: 6
Skaau.com (11) حل السئلة الفاينل لمادة cpcs202 الموجودة في الموديل


السلام عليكم

هذه حلول اسئلة الفاينل وماهي الا اجتهاد شخصي واتمنى اذا كان في اي خطأ تصحيحه ونبدأ على بركة الله
حل الصفحة الاولى
نقرتين لعرض الصورة في صفحة مستقلة

حل الصفحة الثانية
نقرتين لعرض الصورة في صفحة مستقلة

حل الصفحة الثالثة
نقرتين لعرض الصورة في صفحة مستقلة

حل سؤال الصفحة الرابعة تقريبا نفس هذا الكود ولكن يحتاج تعديل بسيط ان تضيف شرط وخيار انه اليوزر يختار انتجر ولا كاركتر
كود:
#include <stdio.h>
main()
{
    int y[50], size, i, min, j, temp=0;
    
    printf("size> ");
    scanf("%d", &size);

for(i=0; i<size; i++)
{
    printf("enter value of y[%d]>>",i);
    scanf("%d", &y[i]);
}
for (i=0; i<size/2; i++)
{
    temp=y[size-(i+1)];
    y[size-(i+1)]=y[i];
    y[i]= temp;
}

for(i=0; i<size; i++)
{
    printf("y[%d]=%d\n",i, y[i]);
}
return(0);
}
حل سؤال الصفحة الخامسة
كود:
#include<stdio.h>
main()
{
    int pc=1500, m=750, pr=300, total_pc=0, total_m=0, total_pr=0, item=0, total=0;
    double dis=0;
    printf("for pc hit 1 \nfor monitor hit 2 \nfor printer hit 3\nto exit hit 0\n\n");
do
{
    printf("enter the value of the item> ");
        scanf("%d", &item);
        
        switch(item)
        {
        case 0:
            break;
        case 1:
            total_pc +=pc;
            break;
        case 2:
            total_m +=m;
            break;
        case 3:
            total_pr +=pr;
            break;
        default:
            printf("wrong item number\n");
            break;

        }
        
}while(item!=0);

total = total_pc + total_m + total_pr;

if(total<1000)
{
    dis = total-((double)total*10/100);
    printf("the total befor the discount is %d the total after the discount is %.2lf",total, dis);
}

if(total>=1001 && total <= 2000)
{
    dis= total-((double)total*20/100);
    printf("the total befor the discount is %d the total after the discount is %.2lf",total, dis);
}

if(total>2001)
{
    dis= total-((double)total*30/100);
    printf("the total befor the discount is %d the total after the discount is %.2lf\n",total, dis);
}

return(0);
}
نصائح مهمة : 1 - إفحص الملف المرفق بأي برنامج مضاد للفيروسات
2 - قم بمراسلة الإدارة عن أي مرفق يوجد به فيروس
3 - المنتدى غير مسوؤل عن مايحتويه المرفق من بيانات
رد مع اقتباس