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

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.rb x C: Users bahri OneDrive desktop Code > 3.1T-resources Resources require

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;
}
*****************************************************

name_tester.rb x C: Users bahri OneDrive desktop Code > 3.1T-resources Resources require './input_functions' 1 2 3 4 5 def print_silly_name (name) count = 0 while count < 1 puts name + ' is a' + ' silly count = count + 1 ' * 3 + name name_teste 6 7 end 8 end 9 def main 10 i = 0 11 12 while (i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!