RUBY PROGRAMMING i want to type a code similar to the ruby code below but inC the
Question:
RUBY PROGRAMMING
i want to type a code similar to the ruby code below but inC
the ruby code does the following
Create a small program that will check the user’s name andrespond with different messages
for different people.
It reads a name from the user, and displays back amessage.
? Check if the name entered is your name.
? If the name is your name or your tutor’s name output the message'Awesome name!'
? Otherwise output the silly name message:
NAME TESTER
#include
#include
#include "terminal_user_input.h"
#define LOOP_COUNT 60
int main()
{
my_string name;
int index;
name = read_string("What is your name? ");
printf("Your name is: %s", name.str);
// Move the following code into a procedure
// ie: void print_silly_name(char* name)
for(index=0;index
printf(" a silly, ");
}
printf("name!");
return 0;
}
*****************************************************