Erster Commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
int x, result;
|
||||
int y = 2;
|
||||
|
||||
printf("Please enter a number: ");
|
||||
scanf("%d", &x);
|
||||
|
||||
printf("\n");
|
||||
|
||||
for (int i = 2; i <= 8; i = i + 2)
|
||||
{
|
||||
result = (int)pow(x, y);
|
||||
printf("%d^%d: %d\n", x, y, result);
|
||||
y = y + 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user