Invitation to Attend “Connect, Simulate and Innovate using Arduino on Cloud”, an awareness programme
If you are not an organiser or invigilator of the Subscribed college, please register using this Google form
How to use Modulus Operator?
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;
sir how should i search mathematical subjects
535 visits
Outline:Outline: ಸಾರಾಂಶ: ಅರಿಥ್ಮೆಟಿಕ್ ಆಪರೇಟರ್ ಗಳು -ಅರಿಥ್ಮೆಟಿಕ್ ಆಪರೇಟರ್ ಗಳು -ಸಂಕಲನದ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ a ಪ್ಲಸ್ b -ವ್ಯವಕಲನದ ಆಪರೇಟರ್ --ಉದಾರಣೆಗೆ a ಮೈನಸ್ b -ಗುಣಾಕಾರದ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ : a ಇಂಟು b -ಭಾಗಾಕಾರದ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ aಬೈ b -ಮಾಡ್ಯುಲಸ್ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ a ಮಾಡ್ಯುಲಸ್ b
Outline: ಸಾರಾಂಶ: ಅರಿಥ್ಮೆಟಿಕ್ ಆಪರೇಟರ್ ಗಳು -ಅರಿಥ್ಮೆಟಿಕ್ ಆಪರೇಟರ್ ಗಳು -ಸಂಕಲನದ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ a ಪ್ಲಸ್ b -ವ್ಯವಕಲನದ ಆಪರೇಟರ್ --ಉದಾರಣೆಗೆ a ಮೈನಸ್ b -ಗುಣಾಕಾರದ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ : a ಇಂಟು b -ಭಾಗಾಕಾರದ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ aಬೈ b -ಮಾಡ್ಯುಲಸ್ ಆಪರೇಟರ್ --ಉದಾಹರಣೆಗೆ a ಮಾಡ್ಯುಲಸ್ b
Show video info
Pre-requisite