Header Ads

ad728
  • New Updates

    Arithmetic Program


    Arithmetic Program

    हम विभन्न प्रकार के Arithmetical Operator को Program द्वारा use करके उनके काम करने के तरीके को समझ सकते है |

      
    #include<stdio.h>
    #include<conio.h>
    main()
    {
    	int A=10 , B=3 , C;
    	C=A+B;
    	printf("\n Addition =%d",C);
    	C=A-B;
    	printf("\n Subtraction =%d",C);
    	C=A*B;
    	printf("\n Multiplication =%d",C);
    	C=A/B;
    	printf("\n Division =%d",C);
    	C=A%B;
    	printf("\n Modules|Remainder =%d",C);
    	getch();
    	
    }
     

    Output

    Addition =13 Subtraction =7 Multiplication =30 Division =3 Modules|Remainder =1

     

    जब भी हम किसी प्रकार की कोई Calculation करते है , Calculation के बाद किसी न किसी प्रका का कोई मान Generate होता है | इस मान को Hold करने के लिए हम हमेशा किसी तीसरे Identifier को Use करते है |

    जब हमें किसी Calculation से Generate होने वाले मान को किसी Identifier में Store करना होता है , तब हम उस Target Identifier को Equal to (= ) Symbol के Left Side में लिखते है और Result Generate करने वाली Calculation में भाग ले रहे Identifiers के Expression को Equal to Symbol के Right side में Specify करते है | Equal To Symbol को “C” Language में Assignment Operator कहा जाता है |

    ये Operator अपने Right Side में Perform होने वाली Calculation से Generate होने वाले Resulting मान को अपने Left Side के Identifier में Store करने का काम करता है |

    इस Program में सबसे पहले Variable Identifier A B के बीच Addition , Subtraction आदि की प्रक्रिया होती है , जिससे कोई न कोई Resultant मान Generate होता है | मान Generate होने के बाद उस मान को Equal To Operator Identifier C में Store हो जाता है | फिर printf( ) Function द्वारा Identifier C में stored इस Resultant मान को Output में Display कर दिया जाता है |

     

     

    No comments

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728