Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void Nhap (int &a, int &b)
- {
- printf("Nhap x: ");
- scanf("%d", &a);
- printf("Nhap n: ");
- scanf("%d", &b);
- }
- int HamMu (int x, int n)
- {
- int i = 2;
- while (i <= n)
- {
- x *= x;
- i++;
- }
- }
- int main()
- {
- int x,n;
- Nhap(x,n);
- printf("%d^%d = %d", x, n, HamMu(x,n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement