Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can someone help me how to do the makefile binary and how to build this program in putty using c programming language? Starting with programming
can someone help me how to do the makefile binary and how to build this program in putty using c programming language?
Starting with programming assignment P02, each program must have a makefile that contains directives to the make command. The makefile directives will have a target for each .c that will create the object file, a target to create the executable (binary) file using the object files created by the object targets and a target called clean to remove all object files. An example of a makefile is in your home directory in the demos subdirectory. Use it as a template. More help/tutorials for makefile are available at makefile_Help.shtml and Wikipedia - makefile Program Name myrand Description The program will produce a table of unique sequence of random integers. Requirements . . In the p02 directory create the subdirectory exo Create the c program myrand.c in the p02/ex0 directory. Using the format and words displayed in the Example of Output, the program will do the following: Displays a message that indicates what the program will do. Asks the user for how many rows of random numbers are to be produced Produce a table of random numbers as follows: The number of rows will be based on the value entered by the users There will be 5 columns of numbers The numbers will be right justified Ends with a thank you message. Make sure that a unique set of numbers is created each time the program runs. Hint: You may need the functions: srand() time(NULL) The man command on CISWEB may be of help. Then again there is google! . Example of Output Welcome to myrand. The program will produce a five column table of random numbers. Please enter the number of rows you would like: 5 user enters 5 1957747793 1189641421 2044897763 1303455736 336465782 1714636915 596516649 1102520059 304089172 1726956429 1681692777 1649760492 783368690 1540383426 294702567 846930886 719885386 1350490027 1365180540 521595368 1804289383 424238335 1025202362 1967513926 35005211 Thank you for using myrand. Bye! Program Name weightem Description The program will allow the user to convert metric weights to english or english weights to metric. Requirements In the p02 directory create the subdirectory ex1 . . . Create the c program weightem.c in the p02/exl directory. Using the format and words displayed in the Example of Output, the program will do the following: Displays a message that indicates what the program will do. Give the user a menu of choices to select as follows: 1. Pounds to Kilos 2. Kilos to Pounds 3. Ounces to Grams. 4. Grams to Ounces 5. Exit - Do nothing (default) Receives a single character from the user for the selected answer which can be the digit or the first letter in the menu above, If the value entered does not match the valid values for the first 4 choices then the program will issue the thank you message and exit with a code of 1. Request a float value representing the value to converted, Convert the value received to the selected conversion value. For this program use the following conversion factors A pound is 0.4536 kilograms An ounce is 28.35 grams Display an appropriate message that indicates the received and converted values with appropriate names. See Example of Output Ends with a thank you message. . . . . . Make sure that your output as indicated on the example output Formats and wording are important, Example of Output Welcome to weightem. The program will convert weights from English to Metric or Metric to English. Indicate which conversion from the selection below. 1. Pounds to Kilos 2. Kilos to Pounds 3. Ounces to Grams. 4. Grams to Ounces 5. Exit - Do nothing (default) Your choice: 3 - User entered value is 3 Enter the number of ounces to convert: 5.25 -- User entered value is 5.25 Answer: 5.25 ounces is 148.83 grams Make sure to use the correct conversion and labels. Thank you for using weightem. Bye Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started