Advertisement
Guest User

7.2

a guest
Apr 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. void step(float x, int n)
  7. {
  8. double result;
  9. result = x;
  10. for (int i=0 ;i < n-1 ;i++){
  11. result *=x;
  12. }
  13. cout << result;
  14. }
  15. int main()
  16. {
  17. step(4,2); // Вот сюда циферки вписываете первая это число , вторая степень, ПОНЯТНО ММММММ
  18. getch();
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement