Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- int main()
- {
- for (int i(1); i<=104; i++)
- {
- for (int j(1); j<=33; j++)
- {
- if (i==1 || i==3 || i==104)
- {
- if (j==1 || j==11 || j==2|| j==33)
- std::cout<<"+";
- else
- std::cout <<"-";
- }
- if (((i==2) || (i>=4 && i<=103)) && (j == 1 || j == 11 || j == 22 || j == 33)) std::cout << "|";
- if (i == 2)
- {
- if (j==2) std::cout<<" Brojevi ";
- if (j==12) std::cout<<" Kvadrati ";
- if(j==23) std::cout<<" Korijeni ";
- }
- if (i>=4 && i<=103)
- {
- if (j == 2) std::cout << " " << std::left << std::setw(8)<< i - 3 ;
- if (j == 12) std::cout << std::right << std::setw(9) << pow(i - 3 , 2 ) <<" ";
- std::cout.precision(4);
- if (j == 23) std::cout << std::right << std::setw(9) << sqrt( i - 3 ) << " ";
- std::cout.precision(4);
- }
- }
- std::cout<< std::endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment