Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions