Arithmetic Operators - Persian
- subtitles off
- captions off
- English
This is a sample video. To access the full content,
 please  
                                
                                     Login
                                
                                 
- Questions posted on Forums
- C and Cpp Tutorials - Persian
- 
                Modulus Operator
                How to use Modulus Operator? 05-06M 20-30S ronakkumar1414@gmail.com
 Answer last updated on: Aug. 21, 2024, 9:50 p.m.
 
- 
                Regarding the program
                While writing the following code for general arthematic operators, I ran the code with an error (which I later found & also marked below).Surprisingly, without showing an error, the compiler gave an output, which is very odd and absurd.FYI, I ran the code on repl.it. How did it even take the value of 'b'? On what basis it produced the outputs?#include <stdio.h>int main(){ int a,b; float sum,diff,prod,quo;int rem;<span style="background-color: rgb(250, 250, 250);"> printf("Enter the value of 'a': ");</span> scanf("%d",&a); printf("Enter the value of 'b': ");scanf("%d",&a); -->Here, I had an error. Instead of 'b', I typed 'a'.sum= a + b;diff= a-b;prod= a * b;quo= (float) a/b;rem= a % b; printf("\n");printf("The sum of a & b is %.2f\n",sum); printf("\n"); printf("The difference of a & b is %.2f\n",diff); printf("\n");printf("The product of a & b is %.2f\n",prod);printf("\n"); printf("The quotient when a is divided by b is %.2f\n",quo);printf("\n");printf("The remainder when a is divided by b is %d\n",rem);return 0; 06-07M 40-50S bsscharan
 Answer last updated on: Aug. 19, 2024, 3:12 p.m.
 
- 
                mathematics
                sir how should i search mathematical subjects 08-09M 50-60S naragonibhaya
 Answer last updated on: Aug. 29, 2017, noon
 
- 
                
                1 First C Program First C Program
- 
                
                2 First Cpp Program First Cpp Program
- 
                
                3 Tokens Tokens
- 
                
                4 Functions Functions
- 
                
                5 Scope Of Variables Scope Of Variables
- 
                
                6 If And Else If statement If And Else If statement
- 
                
                7 Nested If And Switch Statement Nested If And Switch Statement
- 
                
                8 Increment And Decrement Operators Increment And Decrement Operators
- 
                
                 Arithmetic Operators Arithmetic Operators
- 
                
                10 Relational Operators Relational Operators
- 
                
                11 Logical Operators Logical Operators
- 
                
                12 Loops Loops
- 
                
                13 Arrays Arrays
- 
                
                14 Working With 2D Arrays Working With 2D Arrays
- 
                
                15 Strings Strings
- 
                
                16 String Library Functions String Library Functions
- 
                
                17 Working With Structures Working With Structures
- 
                
                18 Understanding Pointers Understanding Pointers
- 
                
                19 Function Call Function Call
- 
                
                20 File Handling In C File Handling In C
Questions posted on ST Forums:
562 visits
Outline:
اپراتورهای محاسباتی اپراتورهای محاسباتی - اپراتور جمع - a + b :مثل -- اپراتور تفریق - a - b :مثل -- اپراتورضرب - a * b :مثل -- اپراتور تقسیم - a / b :مثل -- modulus اپراتور - a % b :مثل --
| Width: | 816 | Height: | 672 | 
|---|---|---|---|
| Duration: | 00:08:48 | Size: | 4.9 MB | 
Show video info
 
                                    
                                