Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

all T-Mobile 12:34 AM libproxy.library.unt.edu WCF-35.7 0.6T-35.7(v)+0.43T(v Wri

ID: 3601742 • Letter: A

Question

all T-Mobile 12:34 AM libproxy.library.unt.edu WCF-35.7 0.6T-35.7(v)+0.43T(v Write a function to receive the temperature and wind speed as input arguments, and return the WCF. Using loops, print a table showing wind chill factors for temperatures ranging from -20 to 55 in steps of 5, and wind speeds ranging from 0 to 55 in steps of 5. Call the function to calculate each wind chill factor. 38. Instead of printing the WCFs in the previous problem, create a matrix of WCFs and write them to a file. Use the programming method, using nested loops. 39.Write a script that will prompt the user for N integers, and then write the positive numbers (> = 0) to an ASCII file called pos.dat and the negative numbers to an ASCII file called neg.dat. Error-check to make sure that the user enters N integers. 40. Write a script to add two 30-digit numbers and print the result. This is not as easy as it might sound at first, because integer types may not be able to store a value this large. One way to handle large integers is to store them in vectors, where each element in the vector stores a digit of the integer. Your script should initialize two 30-digit integers, storing each in a vector, and then add these integers, also storing the result in a vector. Create the original numbers using the randi function. Hint: add 2 numbers on paper first, and pay attention to what you do! 41. Write a "Guess My Number Game" program. The program generates a random integer in a specified range, and the user (the player) has to guess the number. The program allows the user to play as many times as he/she would like; at the conclusion of each game, the program asks whether the player wants to play again. The basic algorithm is: 1. The program starts by printing instructions on the screen.

Explanation / Answer

N=input('Enter the value of N : ');
fid=fopen('pos.dat','w');
fid1=fopen('neg.dat','w');
for i=1:N
str=sprintf('Enter value %d : ',i);
A(i)=input(str);
if(A(i)>=0)
fprintf(fid, '%d ', A(i));
elseif(A(i)<0)
fprintf(fid1, '%d ', A(i));
end
end
fclose(fid);
fclose(fid1);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote