I have a problem with transportation project | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I have a problem with transportation project

I don't understand with modulo

13th Jul 2021, 1:13 PM
MaxXou 57
MaxXou 57 - avatar
2 Answers
+ 1
Once Read problem statement and see input and output formats you will get it
13th Jul 2021, 1:39 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
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
15th Jul 2021, 9:25 AM
MOHAMED THOUFIC YOUSUF