fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int broj,kvadrat;
  5. cin >> broj;
  6. if (broj >= 0)
  7. {
  8. cout << "Бројот е позитивен." << endl;
  9. kvadrat=broj *broj;
  10. cout << "Квадратот на бројот е:" <<kvadrat ;
  11. }
  12. else
  13. {
  14. cout << "Бројот не е позитивен." << endl;
  15. }
  16. return 0;
  17.  
  18.  
  19. }
  20.  
Success #stdin #stdout 0.01s 5272KB
stdin
18
stdout
Бројот е позитивен.
Квадратот на бројот е:324