0
I have a problem with transportation project
I don't understand with modulo
2 Réponses
+ 1
Once Read problem statement and see input and output formats you will get it
0
Modulo means return the remainder
For example if you do modulo for two integers, let's say 20 and 3 . Now divide 20 by 3 you will get quotient 6 and the remainder is 2
#include<iostream>
using namespace std;
int main()
{int x=20;
int y=3;
int z=x/y;
int r=x%y;
cout<<z<<endl;
cout<<r;}
Output:
6
2