Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- /*6. Napisz program pobierający od użytkownika jedną liczbę całkowitą
- i sprawdzający czy jest ona podzielna przez 3.
- Zwróć odpowiedni komunikat. */
- int x;
- cout<<"Podaj liczbe calkowita: "<<endl;
- cin>>x;
- if (x%3==0)
- {
- cout<<"Liczba jest podzielna przez 3 ";
- }
- else
- {
- cout<<"Liczba nie jest podzielna przez 3 ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement