Repository navigation
Expand file tree
/
Copy pathmain.c
More file actions
61 lines (58 loc) · 1.31 KB
/
Copy pathmain.c
File metadata and controls
61 lines (58 loc) · 1.31 KB
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
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include "header_files/DateAndTimeFunctions.h"
#include "header_files/GeneralFunctions.h"
#include "header_files/MusicFunctions.h"
#include "header_files/MathFunctions.h"
int main()
{
int j, k;
char input[256], output[256];
printf("Hello, How can Psycho help you?\n\n");
system("say.vbs \"Hello, How can Psycho help you?\"");
do
{
printf("You: ");
gets(input);
s_tolower(input, output);
if(isMusic(output))
{
playMusic();
fflush(stdin);
continue;
}
if(isMath(output))
{
int a=0, b=0;
j= isMath(output);
giveNumbers(output, &a, &b);
applyMath(j, a, b);
continue;
}
if(isJoke(output))
{
jokes();
continue;
}
if(isTime(output))
{
dateAndTime(output);
continue;
}
if(isApp(output))
{
k = isApp(output);
startApp(k);
continue;
}
if(strcmp(output, "bye")==0 || strcmp(output, "exit")==0 || strcmp(output, "good bye")==0)
{
printf("Psycho: See you later!\n");
system("say.vbs \"See you later.\"");
exit(0);
}
getInput(output);
}
while(1);
}