-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
44 lines (35 loc) · 975 Bytes
/
main.c
File metadata and controls
44 lines (35 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void performCalculation(int x, int y);
void performCalculation2(int x, int y);
void handleUserInput();
void displayResult(int result);
int main() {
printf("Welcome to the Git Conflict Simulation!\n");
handleUserInput();
return 0;
}
void performCalculation(int x, int y)
{
printf("Calculating result for %d and %d...\n", x, y);
int result = x + y;
displayResult(result);
}
void performCalculation2(int x, int y)
{
printf("Calculating %d to the power of %d...\n", x, y);
int result = pow(x, y);
displayResult(result);
}
void handleUserInput() {
int a, b;
printf("Enter two integers: ");
scanf("%d %d", &a, &b);
performCalculation(a, b);
}
void displayResult(int result) {
printf("The result is: %d\n", result);
}
// (corkang) be strong and courageous.
//is the result of the calculation of the power of two integers and the power of two integers (민찬)