طلب: حل الـ Homework الثاني لـ ICS 103

الموضوع في 'علوم الحاسب الآلي' بواسطة بن زايد, بتاريخ ‏3 يوليو 2012.

  1. بن زايد

    بن زايد عضو

    انضم:
    ‏30 أكتوبر 2009
    المشاركات:
    67
    التخصص:
    هندسة مدنية
    الجامعة:
    KFUPM
    سنة التخرج:
    2015
    نقاط الجائزة:
    0
    التقييمات:
    +2 / 0 / -0
    سلام عليكم شباب اللي حل h.w 2 ياليت يعطينا وشكرا.
     
  2. @Saad@

    @Saad@ عضو

    انضم:
    ‏4 أغسطس 2009
    المشاركات:
    200
    نقاط الجائزة:
    0
    التقييمات:
    +1 / 0 / -0
    طيب رقم الكورس وحط السؤال علشان أقدر أساعدك.
     
  3. بن زايد

    بن زايد عضو

    انضم:
    ‏30 أكتوبر 2009
    المشاركات:
    67
    التخصص:
    هندسة مدنية
    الجامعة:
    KFUPM
    سنة التخرج:
    2015
    نقاط الجائزة:
    0
    التقييمات:
    +2 / 0 / -0
  4. أبو عساف

    أبو عساف .: صـ [ المـ ـقـ ـناص ] ـر :.

    انضم:
    ‏1 يونيو 2009
    المشاركات:
    525
    نقاط الجائزة:
    0
    الإقامة:
    .:. في عيون خلّي .:.
    التقييمات:
    +1 / 0 / -0
    Q1. [Points: 20] [To be done after covering Loops ] Question#5 on page#307 of your textbook: “Problem Solving and Program Design in C”, 6th Edition, with the additional requirement that your program must be interactive and it must check for input validity [Check only whether the number is negative or not. Don’t check the number of digits]. The program must loop, displaying an error message as long as the input integer is negative.
    Sample runs of the program:


    Q2. [Points: 20] [To be done after covering Loops and Data Files] Question#9 on page#307 of your textbook: “Problem Solving and Program Design in C”, 6th Edition; but use the following formula:

    [ P + { (an^2) / (V^2) } ] (V-bn) = nRT
    Also: note that in the sample run in the textbook, the Quantity of carbon dioxide (moles) is not 0.02 but 20
    Sample run of the program:


    The contents of your output file should be:

    Q3. [Points: 20] [To be done after covering Loops and Functions] Question#9 on page#359 of your textbook: “Problem Solving and Program Design in C”, 6th Edition.
    Sample run of the program:
     
  5. aziz al hilali

    انضم:
    ‏29 مايو 2012
    المشاركات:
    9
    نقاط الجائزة:
    0
    التقييمات:
    +0 / 0 / -0
    شباب ساعدونا
     
  6. mohammed10

    mohammed10 عضو

    انضم:
    ‏31 يوليو 2008
    المشاركات:
    626
    التخصص:
    EE
    الجامعة:
    KFUPM
    سنة التخرج:
    2014
    نقاط الجائزة:
    0
    الوظيفة:
    متسبب !!
    الإقامة:
    قلب الجامعة
    التقييمات:
    +7 / 0 / -0
    #include<stdio.h>
    #include<stdlib.h>

    int main ()
    {
    int num, num1=0;
    printf("Enter the number >:\n ");
    scanf("%d", &num);
    while(num<0) {
    printf("error! negative input:\n ");
    scanf("%d", &num);
    }
    while(num>0)
    {
    num1= num1*10+num%10;
    num= num/10;
    }
    printf("the reverse is %d \n", num1);
    system("pause");

    }


    هذا حل السؤال الأول
    انتبهوا من الأخطاء الاملاية :khotrah:
     
  7. mohammed10

    mohammed10 عضو

    انضم:
    ‏31 يوليو 2008
    المشاركات:
    626
    التخصص:
    EE
    الجامعة:
    KFUPM
    سنة التخرج:
    2014
    نقاط الجائزة:
    0
    الوظيفة:
    متسبب !!
    الإقامة:
    قلب الجامعة
    التقييمات:
    +7 / 0 / -0
    الثالث ياعيال, الثالث ياعيال


    #include<stdio.h>
    #include<stdlib.h>
    #define mass 1.23

    int main ()
    {
    double A, cd, F;
    int v;

    printf("Enter area <A> and drag cofficent <cd> (0.2 to 0.5) :\n ");
    scanf("%lf %lf", &A, &cd);
    printf("Velocity <m/s> \t Drag force <Newtons> \n");

    for (v=0; v<=40; v= v+5)
    {
    F= (A*cd*mass*v*v)/2;
    printf("%d \t \t %.2f \n", v, F);

    }

    system("pause");
    }
     
  8. mohammed10

    mohammed10 عضو

    انضم:
    ‏31 يوليو 2008
    المشاركات:
    626
    التخصص:
    EE
    الجامعة:
    KFUPM
    سنة التخرج:
    2014
    نقاط الجائزة:
    0
    الوظيفة:
    متسبب !!
    الإقامة:
    قلب الجامعة
    التقييمات:
    +7 / 0 / -0
    باقي ما نمتوا

    السؤال الثالث لكن القانون كتبت
    خرابيط من عندي

    #include<stdio.h>
    #include<stdlib.h>
    #define a 3.592
    #define b 0.0427
    #define R 0.08206
    int main ()
    {
    double n, T, v1, v2, p, inc, v;
    FILE *out;
    out= fopen("results.txt", "w");
    printf("Enter quantity of carbon :\n ");
    scanf("%lf" , &n);
    printf("Enter tempreture :\n ");
    scanf("%lf" , &T);
    printf("Enter Initial volume :\n ");
    scanf("%lf" , &v1);
    printf("Enter final volume :\n ");
    scanf("%lf" , &v2);
    printf("Enter volume increment :\n ");
    scanf("%lf" , &inc);

    fprintf(out, "%f of carbon dioxide at %f kelvin \n", n, T);
    fprintf(out, "Volume \t \t Pressure \n");

    for (v= v1; v<=v2; v= v+inc)
    {

    p= (n*R*T)/v;

    fprintf(out, "%f \t \t %f \n", v, p);

    }

    fclose(out);

    printf("Data succsesfully written to results.txt \n ");

    system("pause");
    }
     
  9. mohammed10

    mohammed10 عضو

    انضم:
    ‏31 يوليو 2008
    المشاركات:
    626
    التخصص:
    EE
    الجامعة:
    KFUPM
    سنة التخرج:
    2014
    نقاط الجائزة:
    0
    الوظيفة:
    متسبب !!
    الإقامة:
    قلب الجامعة
    التقييمات:
    +7 / 0 / -0
    لو تكتبون لي الــــ p وش تساوي أحولها لكم على أساس متغيراتي
     
  10. mohammed10

    mohammed10 عضو

    انضم:
    ‏31 يوليو 2008
    المشاركات:
    626
    التخصص:
    EE
    الجامعة:
    KFUPM
    سنة التخرج:
    2014
    نقاط الجائزة:
    0
    الوظيفة:
    متسبب !!
    الإقامة:
    قلب الجامعة
    التقييمات:
    +7 / 0 / -0
    اعذرونا عالقصور يا عيال


    فالكم الفل مارك.


    اللي عنده إشكال ولا شي أنا في الخدمة.
     
جاري تحميل الصفحة...
مواضيع شبيهة - طلب: حل الـ Homework الثاني لـ ICS 103
  1. MKD
    الردود:
    12
    المشاهدات:
    1,781
  2. VIP__AA
    الردود:
    7
    المشاهدات:
    2,876
  3. ABU FRAS
    الردود:
    7
    المشاهدات:
    1,347
  4. القــ 07 ــرني
    الردود:
    14
    المشاهدات:
    2,330
  5. tfe-2009
    الردود:
    24
    المشاهدات:
    4,081
  6. Muhannad
    الردود:
    2
    المشاهدات:
    633
  7. Scientific_man
    الردود:
    0
    المشاهدات:
    834
  8. m.tawhari
    الردود:
    0
    المشاهدات:
    1,442
  9. Omar Bawazeer
    الردود:
    2
    المشاهدات:
    2,094
  10. Ahm2d__
    الردود:
    1
    المشاهدات:
    908

مشاركة هذه الصفحة