SlideShare a Scribd company logo
1 of 2
‫مقرر معالجـــــــة البيانـــــــــــات‬
                                    6 ‫ورقة عمل رقم‬
                                  ‫إعداد د. ماجد حمايل‬



                     mhamayil@qou.edu‫ملحظة أرسل الورقة بعد حلها إلى‬
                                                ‫وستحصل على السابعة‬
                            ‫أكتب ناتج تنفيذ البرنامج التالي دون كتابته على المترجم موضحا كل نتيجة‬
// Using Arithmetic Operator page 188

#include <stdio.h>
#include <conio.h>
main()
{
int no1=5 ,no2=2;
int sum,pro,mod;
float div;
sum=no1+no2;
pro=no1*no2;
mod=no1%no2;
div=no1/no2;
printf("The result is=   %dn",no1);5
printf("The result is=   %dn",++no1);6
printf("The result is=   %dn",--no2);1
printf("The result is=   %dn",--no2);0
printf("The result is=   %dn",sum);7
printf("The result is=   %dn",pro);10
printf("The result is=   %dn",mod);1
printf("The result is=   %dn",sum);7
printf("The result is=   %.2fn",div);2.00
getche();
 }


                                                                                      ‫وضح الناتج‬

include <stdio.h>
#include <conio.h>
main()
{

int x,y,z;
z=y=x=0;

    printf("Xt Yt Ztn ", x,y,z);
    printf("========================n");
    printf("%dt %dt %dtn ", x,y,z);
    z=++y + ++x;
    printf("%dt %dt %dtn ", x,y,z);
    z=y++ + x++;
    printf("%dt %dt %dtn ", x,y,z);
    z=++y + x++;
    printf("%dt %dt %dtn ", x,y,z);
    z=y-- + --x;
    printf("%dt %dt %dt ", x,y,z);

    getche();

}


                        x                   y   z
                        0                   0   0
                        0                   1   2
                        2                   2   2
                        3                   3   5
                        2                   2   5

More Related Content

Viewers also liked

Effective search strategies
Effective search strategiesEffective search strategies
Effective search strategies
Lisa Proctor
 
وحدة الصيانة المنزلية
وحدة الصيانة المنزليةوحدة الصيانة المنزلية
وحدة الصيانة المنزلية
om101
 
Tracking with Google Analytics
Tracking with Google AnalyticsTracking with Google Analytics
Tracking with Google Analytics
ePageCreator
 

Viewers also liked (6)

Convergence
ConvergenceConvergence
Convergence
 
Effective search strategies
Effective search strategiesEffective search strategies
Effective search strategies
 
Resume
ResumeResume
Resume
 
وحدة الصيانة المنزلية
وحدة الصيانة المنزليةوحدة الصيانة المنزلية
وحدة الصيانة المنزلية
 
Tracking with Google Analytics
Tracking with Google AnalyticsTracking with Google Analytics
Tracking with Google Analytics
 
Neurotechnology
NeurotechnologyNeurotechnology
Neurotechnology
 

Paper6

  • 1. ‫مقرر معالجـــــــة البيانـــــــــــات‬ 6 ‫ورقة عمل رقم‬ ‫إعداد د. ماجد حمايل‬ mhamayil@qou.edu‫ملحظة أرسل الورقة بعد حلها إلى‬ ‫وستحصل على السابعة‬ ‫أكتب ناتج تنفيذ البرنامج التالي دون كتابته على المترجم موضحا كل نتيجة‬ // Using Arithmetic Operator page 188 #include <stdio.h> #include <conio.h> main() { int no1=5 ,no2=2; int sum,pro,mod; float div; sum=no1+no2; pro=no1*no2; mod=no1%no2; div=no1/no2; printf("The result is= %dn",no1);5 printf("The result is= %dn",++no1);6 printf("The result is= %dn",--no2);1 printf("The result is= %dn",--no2);0 printf("The result is= %dn",sum);7 printf("The result is= %dn",pro);10 printf("The result is= %dn",mod);1 printf("The result is= %dn",sum);7 printf("The result is= %.2fn",div);2.00 getche(); } ‫وضح الناتج‬ include <stdio.h> #include <conio.h> main() { int x,y,z;
  • 2. z=y=x=0; printf("Xt Yt Ztn ", x,y,z); printf("========================n"); printf("%dt %dt %dtn ", x,y,z); z=++y + ++x; printf("%dt %dt %dtn ", x,y,z); z=y++ + x++; printf("%dt %dt %dtn ", x,y,z); z=++y + x++; printf("%dt %dt %dtn ", x,y,z); z=y-- + --x; printf("%dt %dt %dt ", x,y,z); getche(); } x y z 0 0 0 0 1 2 2 2 2 3 3 5 2 2 5