Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,47 +1,40 @@
/*
Maaz Kamal, Kyle Austin, Justin Van Nimwegen, Yezen Higazin - 4

Assignment Name : Three_Digit_Ascend_Descend_Selection

Taking in data and tranfering into 'if' statements

/*
-Maaz Kamal, Kyle Austin, Justin Van Nimwegen, Yezen Higazin - 4
Edited By: Marcus Basta
Assignment: Three Digit Ascend Decend Selection
*/

//Libraries
#include <iostream>
#include <iostream>
#include <conio.h>

//namespaces
using namespace std;

//functions
void pause() {
cout << "Press any key to continue . . .";
while (!_kbhit());
_getch();
cout << '/n';
}

void main() {
int x;
cout << "Choose a 3 Digit #" << endl;
cin >> x;
cout << "You Chose " << x << endl;

int A = x / 100;
int B = x % 100 / 10;
int C = x % 10;

if ((A > B) && (B > C)) {
cout << "Decending" << endl;

}
else if ((A < B) && (B < C)) {
cout << "Acending" << endl;
}
else {
cout << "Neither" << endl;
}
void pause() {
cout << "press any key to continue. . . ";
while (!_kbhit());
_getch();
cout << '/n';
}

pause();
}
void main() {
int x;

for (int i = 1; i <= 30; i++) {
cout << i << endl;
cout << "Choose a 3 Digit #" << endl;
cin >> x;
int A = x / 100;
int B = x % 100 / 10;
int C = x % 10;
cout << "Choose wiseley " << x << endl;
if ((A > B) && (B > C)) {
cout << "decending" << endl;
}
else if ((A < B) && (B < C)) {
cout << "acending" << endl;
}
else {
cout << "neither" << endl;
}
}
}