-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalanlab2.cpp
More file actions
35 lines (31 loc) · 803 Bytes
/
alanlab2.cpp
File metadata and controls
35 lines (31 loc) · 803 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
#include <stdio.h>
#include <math.h>
#include <string>
#include <iostream>
struct datham{
int hams;
std::string name;
}datham;
int main(){
/*
int a;
printf("input number 'A' up to 99999: ");
scanf("%6d", &a);
int b;
printf("input number 'B' up to 99999: ");
scanf("%6d", &b);
printf("A + B = %d\n", a + b);
printf("A - B = %d\n", a - b);
printf("A * B = %d\n", a * b);
printf("A / B = %d\n", a / b);
printf("A % B = %d\n", a % b);
printf("A ^ B = %d\n", (int)pow(a, b));
*/
printf("input your number of hams: ");
struct datham guy;
std::cin >> guy.hams;
printf("input your datham name: ");
std::cin >> guy.name;
std::cout << "datham name: " << guy.name << "\ndatham hams: " << guy.hams << std::endl;
return 0;
}