Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int pierw(int q){
- int y;
- y = q*q;
- cout << "Kwadrat liczyby "<< q << " wynosi " << y << endl;
- };
- int pierw(int t, int m){
- int z = 1;
- for (int i=1; i<=m; i++){
- z=z*t;
- }
- cout << "Liczba " << t << " podniesiona do " << m << " potegi wynosi " << z << endl << endl;
- }
- int main()
- {
- int x = 1;
- int n = 3;
- while (x<=5){
- pierw (x);
- pierw (x, n);
- x++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement