Question: write a C program that generates a user specified number of random integers in the range 50~30 and prints these integers, cuts them in place,
write a C program that generates a user specified number of random integers in the range 50~30 and prints these integers, cuts them in place, and then prints the cut integers. Here "cut" means taking absolute value. E.g. cutting 3 would produce 3 while cutting-12 would produce 12. The program should consist of three files mysourceh, mysource.cand myMain.c. The file myMain.c should contain only the definition of main, which must call three additional functions to accomplish the task. The three functions to generate the integers, cut the integers and print the integers should be declared in mysource.h with the following prototype and defined in mysource.c void generate Nums (int *myan, int len); void cutNums (int *myarr, int len); void print Nums (int *myare, int len)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
