-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGRAPHS.cpp
More file actions
42 lines (40 loc) · 745 Bytes
/
Copy pathGRAPHS.cpp
File metadata and controls
42 lines (40 loc) · 745 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
/* DE OCAMPO, MARIA THERESA G.
* BSIT 2 -3
* GRAPHS
* 23-09-2019
*/
#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <unistd.h>
#include "undirected.h"
#include "directed.h"
#define ERROR 0
int
main(){
int choice, status;
char sagot;
do{
refresh_main_menu();
gotoxy(4, 14); printf("Pick a no.: ");
status = scanf("%d", &choice);
getchar();
sleep(0.10);
switch(choice){
case 1:
undirected();
break;
case 2:
directed();
break;
case 3:
system("cls");
exit(EXIT_SUCCESS);
break;
default:
gotoxy(25, 19); printf("*** [ERROR] Invalid Selection! ***");
}
sleep(2);
} while (choice != 3 || status == ERROR);
return 0;
}