OAIP_Mirror/geany/lab4-2.c
2024-10-21 17:04:00 +04:00

23 lines
279 B
C

#include <stdio.h>
#include <Windows.h>
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
int n;
printf("n = ");
scanf("%d", &n);
int i = 1;
int step = 0;
do {
printf("2^%d = %d\n", step, i);
i = i * 2;
step += 1;
} while (step <= n);
return 0;
}