Question: I am getting error on line 15 This is what I got but I'm getting an error on Line 15: Variable declaration must be at

I am getting error on line 15

This is what I got but I'm getting an error on Line 15: Variable declaration must be at top of function. Something above this line may not be a variable declaration

Function getMinimumInt(integer array(?) userVals) returns integer minInt integer i minInt=userVals[0] // Iterating the array and finding the min of the array for i = 1; i < userVals.size; i = i + 1 if userVals[i]

Function Main() returns nothing // integer array integer array(5) userVals // taking user input and storing it the array integer i for i = 0; i < userVals.size; i = i + 1 userVals[i]=Get next input - line 15 integer min min = getMinimumInt(userVals) // normalizing the array for i = 0; i < userVals.size; i = i + 1 userVals[i]=userVals[i]-min // printing the output Put userVals[i] to output

i can not get past this error!

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!