Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int kwota,kwota2,piatki,dwojki,i=0,j=0;
- cout << "Podaj kwote: ";
- cin >> kwota;
- kwota2 = kwota;
- do{
- if(kwota >= 5)
- {
- kwota = kwota - 5;
- i++;
- }
- else
- {
- cout << "Ilosc 5: " << i;
- }
- }while(kwota >=5);
- cout << "Ilosc 5: " << i << endl;
- do{
- if(kwota2 >= 2)
- {
- kwota2 = kwota2 - 2;
- j++;
- }
- else
- {
- cout << "Ilosc 2: " << j;
- }
- }while(kwota2 >=2);
- cout << "Ilosc 2: " << j << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement