aboutsummaryrefslogtreecommitdiff
path: root/Homework 4/program.cpp
blob: 87d59e4cb98b064c28f15596ee0c552eb316c423 (plain) (blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Name: Asahel Lopez
// Date: 2/2/24
// Class: CST 116
// Assignment: Homework 4

#include <iostream>

using std::cout;
using std::endl;
using std::cin;

void Print() {

	for (int i = 0; i <= 100; i++) {
		cout << i << " ";
	}
}

void InputPersonalInfo() {
	int i = 0;
	do {
		cout << i << "\n";
		i++;
	} while (i < 5);
}

int fib(int n) {

	if (n <= 1)
		return n;
return fib(n - 1) + fib(n - 2);
}

int main() {

	cout << "A. Print(100)" << endl;
	cout << "B. Input Personal Information" << endl;
	cout << "C. Print Fibonacci" << endl;
	cout << "D. Exit" << endl;

	char input = 'A';

	switch (input) {
	case 'A':
		Print();
		break;
	}

	InputPersonalInfo(); {

		int month;
		int day;
		int year;

		cout << "Enter the month you were born in" << endl;
		cin >> month;


		cout << "Enter the day you were born in" << endl;
		cin >> day;


		cout << "Enter the year you were born in" << endl;
		cin >> year;


		cout << "You were born in: " << month << " " << day << " " << year << endl;


		return 0;
	}

	
	int fib(int n);{

		int n = 9;
		cout << n << fib(n);
		

			return 0;
	}


		

	return 0;
}