Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- int main()
- {
- std:: cout << "Unesite broj n: ";
- int n;
- std:: cin >> n;
- std:: cout << "+-----+-----+-----+-----+-----+" << std::endl<< "|";
- for(int i=1; i<=n; i++)
- {
- std:: cout<< std::setw(4)<< i<< " |";
- }
- std:: cout<< std::endl;
- for(int i=2; i<=n; i++)
- {
- std:: cout << "|" <<std::setw(4)<< i<< " |";
- for(int j=2; j<=n; j++)
- {
- std:: cout << std::setw(4) << i*j << " |";
- }
- std:: cout << std:: endl;
- }
- std:: cout << "+-----+-----+-----+-----+-----+";
- return 0;
- }
- // ispisije kao rezultat: -inf!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement