Question: The first homework will be a classics one. Please, write a simple program in which you ask the user to enter 2 numbers then the

The first homework will be a classics one. Please, write a simple program in which you ask the user to enter 2 numbers then the code prints the results of (+,-,*,/) operators on the screen. You can make this in a loop. However the catch is all of those 4 operations will be computed in the subroutines and the results will be written in the main. So you are going to use : subroutines in FORTRAN and functions in C for 4 mathematical operations.
This is the second HW where we suppose to calculate the mean and standard deviation of the array given below:
in FORTRAN :
real a(20)
DATA a/13,14,12,101,41,31,19,191,11,31,51,121,131,451,6633,0,3,11010,1,341/
in C:
float a[]
={0,13,14,12,101,41,31,19,191,11,31,51,121,131,451,6633,0,3,11010,1,341}
You are supposed to write the main (main in C, Program in Fortran) part defining the a matrix(array). In the subroutine of mean for FORTRAN, and in the Function for C , you are going to calculate the mean and the standard deviation of the array and send back to the main part of the code. There in the main, you are supposed to write the result on the screen.

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 Databases Questions!