Mercurial > codedump
changeset 74:2057ab53f04e
Update and rename garf.cpp to garf.c
committer: GitHub <noreply@github.com>
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Sat, 25 Jun 2022 07:25:46 -0400 |
parents | be417b4518a6 |
children | dbf5ce219fe3 |
files | garf.c garf.cpp |
diffstat | 2 files changed, 15 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/garf.c Sat Jun 25 07:25:46 2022 -0400 @@ -0,0 +1,15 @@ +// garf simulator +#include <stdio.h> +#include <string.h> + +int main(void) { + char answer[255]; + std::cout << "would you like to monetize 1123.best?: "; + fgets(answer, sizeof(answer), stdin); + if(strcmp(answer, "yes") == 0) { + std::cout << "it's a yes!"; + } else { + std::cout << "it's a yes!"; + } + return 0; +}
--- a/garf.cpp Wed Jun 22 19:39:00 2022 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -// garf simulator -#include <iostream> -#include <stdio.h> -#include <string.h> - -int main() { - char answer[255]; - std::cout << "would you like to monetize 1123.best?: "; - fgets(answer, sizeof(answer), stdin); - if(answer == "yes") { - std::cout << "it's a yes!"; - } - else { - std::cout << "it's a yes!"; - } - return 0; -}