Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- int b;
- cin>>a>>b;
- if(a==b)
- cout<<"0"<<endl;
- else{
- int x=b-a;
- int petki;
- int kusur;
- int dvojki;
- int edinici;
- int vkupno;
- petki=x/5;
- kusur=x%5;
- dvojki=kusur/2;
- edinici=kusur%2;
- vkupno=petki+dvojki+edinici;
- cout<<vkupno<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement