SlideShare a Scribd company logo
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]<minInt
minInt=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!

More Related Content

More from gentomega

How was the point of view effective to the story-What was the purpose.docx
How was the point of view effective to the story-What was the purpose.docxHow was the point of view effective to the story-What was the purpose.docx
How was the point of view effective to the story-What was the purpose.docx
gentomega
 
How many cycles are there in Figure II- Based on Figure II- identify t.docx
How many cycles are there in Figure II- Based on Figure II- identify t.docxHow many cycles are there in Figure II- Based on Figure II- identify t.docx
How many cycles are there in Figure II- Based on Figure II- identify t.docx
gentomega
 
How many bones do sharks have- What is sphenopalatine ganglioneuralgia.docx
How many bones do sharks have- What is sphenopalatine ganglioneuralgia.docxHow many bones do sharks have- What is sphenopalatine ganglioneuralgia.docx
How many bones do sharks have- What is sphenopalatine ganglioneuralgia.docx
gentomega
 
How does phosphorylation activate an enzyme- Please choose the correct.docx
How does phosphorylation activate an enzyme- Please choose the correct.docxHow does phosphorylation activate an enzyme- Please choose the correct.docx
How does phosphorylation activate an enzyme- Please choose the correct.docx
gentomega
 
How does cultural diversity impact the behavior of international busin.docx
How does cultural diversity impact the behavior of international busin.docxHow does cultural diversity impact the behavior of international busin.docx
How does cultural diversity impact the behavior of international busin.docx
gentomega
 
How do the factors influencing the middle income housing market that a.docx
How do the factors influencing the middle income housing market that a.docxHow do the factors influencing the middle income housing market that a.docx
How do the factors influencing the middle income housing market that a.docx
gentomega
 
How can we use social media channels to drive brand success- a)Explain.docx
How can we use social media channels to drive brand success- a)Explain.docxHow can we use social media channels to drive brand success- a)Explain.docx
How can we use social media channels to drive brand success- a)Explain.docx
gentomega
 
HIV infection passes through a series of steps or stages before it tur.docx
HIV infection passes through a series of steps or stages before it tur.docxHIV infection passes through a series of steps or stages before it tur.docx
HIV infection passes through a series of steps or stages before it tur.docx
gentomega
 
Hi there please help me to find the correct account for Total deductio.docx
Hi there please help me to find the correct account for Total deductio.docxHi there please help me to find the correct account for Total deductio.docx
Hi there please help me to find the correct account for Total deductio.docx
gentomega
 
Here is a frequency distribution table for a small data set- Find the.docx
Here is a frequency distribution table for a small data set- Find the.docxHere is a frequency distribution table for a small data set- Find the.docx
Here is a frequency distribution table for a small data set- Find the.docx
gentomega
 
helpp Middle America - Geography Match the Region with the Correct Des.docx
helpp Middle America - Geography Match the Region with the Correct Des.docxhelpp Middle America - Geography Match the Region with the Correct Des.docx
helpp Middle America - Geography Match the Region with the Correct Des.docx
gentomega
 
HELPPP 4- Examine the figure above and answer the following- Specifica.docx
HELPPP 4- Examine the figure above and answer the following- Specifica.docxHELPPP 4- Examine the figure above and answer the following- Specifica.docx
HELPPP 4- Examine the figure above and answer the following- Specifica.docx
gentomega
 
Help with Java! Can someone check my code What I am trying to accompli.docx
Help with Java! Can someone check my code What I am trying to accompli.docxHelp with Java! Can someone check my code What I am trying to accompli.docx
Help with Java! Can someone check my code What I am trying to accompli.docx
gentomega
 
help me to answer for assignment- my course name is advanced diploma.docx
help me to  answer for assignment- my course name is advanced diploma.docxhelp me to  answer for assignment- my course name is advanced diploma.docx
help me to answer for assignment- my course name is advanced diploma.docx
gentomega
 
help me answer the questions please Health Care Associated Disease Tr.docx
help me answer the questions please  Health Care Associated Disease Tr.docxhelp me answer the questions please  Health Care Associated Disease Tr.docx
help me answer the questions please Health Care Associated Disease Tr.docx
gentomega
 
Hello- Below is my E-R Diagram- I need to change two items- 1- Based o.docx
Hello- Below is my E-R Diagram- I need to change two items- 1- Based o.docxHello- Below is my E-R Diagram- I need to change two items- 1- Based o.docx
Hello- Below is my E-R Diagram- I need to change two items- 1- Based o.docx
gentomega
 
hello can someone give me a good discription on this ( What are Lichen.docx
hello can someone give me a good discription on this ( What are Lichen.docxhello can someone give me a good discription on this ( What are Lichen.docx
hello can someone give me a good discription on this ( What are Lichen.docx
gentomega
 
Hartford's assets is unchanged- what happens to Hartford's equity cost.docx
Hartford's assets is unchanged- what happens to Hartford's equity cost.docxHartford's assets is unchanged- what happens to Hartford's equity cost.docx
Hartford's assets is unchanged- what happens to Hartford's equity cost.docx
gentomega
 
Gymnosperms produce a large amount of pollen because gymnosperms rely.docx
Gymnosperms produce a large amount of pollen because gymnosperms rely.docxGymnosperms produce a large amount of pollen because gymnosperms rely.docx
Gymnosperms produce a large amount of pollen because gymnosperms rely.docx
gentomega
 
Harry (69) and Lisa (66) are married- They filed separate returns and.docx
Harry (69) and Lisa (66) are married- They filed separate returns and.docxHarry (69) and Lisa (66) are married- They filed separate returns and.docx
Harry (69) and Lisa (66) are married- They filed separate returns and.docx
gentomega
 

More from gentomega (20)

How was the point of view effective to the story-What was the purpose.docx
How was the point of view effective to the story-What was the purpose.docxHow was the point of view effective to the story-What was the purpose.docx
How was the point of view effective to the story-What was the purpose.docx
 
How many cycles are there in Figure II- Based on Figure II- identify t.docx
How many cycles are there in Figure II- Based on Figure II- identify t.docxHow many cycles are there in Figure II- Based on Figure II- identify t.docx
How many cycles are there in Figure II- Based on Figure II- identify t.docx
 
How many bones do sharks have- What is sphenopalatine ganglioneuralgia.docx
How many bones do sharks have- What is sphenopalatine ganglioneuralgia.docxHow many bones do sharks have- What is sphenopalatine ganglioneuralgia.docx
How many bones do sharks have- What is sphenopalatine ganglioneuralgia.docx
 
How does phosphorylation activate an enzyme- Please choose the correct.docx
How does phosphorylation activate an enzyme- Please choose the correct.docxHow does phosphorylation activate an enzyme- Please choose the correct.docx
How does phosphorylation activate an enzyme- Please choose the correct.docx
 
How does cultural diversity impact the behavior of international busin.docx
How does cultural diversity impact the behavior of international busin.docxHow does cultural diversity impact the behavior of international busin.docx
How does cultural diversity impact the behavior of international busin.docx
 
How do the factors influencing the middle income housing market that a.docx
How do the factors influencing the middle income housing market that a.docxHow do the factors influencing the middle income housing market that a.docx
How do the factors influencing the middle income housing market that a.docx
 
How can we use social media channels to drive brand success- a)Explain.docx
How can we use social media channels to drive brand success- a)Explain.docxHow can we use social media channels to drive brand success- a)Explain.docx
How can we use social media channels to drive brand success- a)Explain.docx
 
HIV infection passes through a series of steps or stages before it tur.docx
HIV infection passes through a series of steps or stages before it tur.docxHIV infection passes through a series of steps or stages before it tur.docx
HIV infection passes through a series of steps or stages before it tur.docx
 
Hi there please help me to find the correct account for Total deductio.docx
Hi there please help me to find the correct account for Total deductio.docxHi there please help me to find the correct account for Total deductio.docx
Hi there please help me to find the correct account for Total deductio.docx
 
Here is a frequency distribution table for a small data set- Find the.docx
Here is a frequency distribution table for a small data set- Find the.docxHere is a frequency distribution table for a small data set- Find the.docx
Here is a frequency distribution table for a small data set- Find the.docx
 
helpp Middle America - Geography Match the Region with the Correct Des.docx
helpp Middle America - Geography Match the Region with the Correct Des.docxhelpp Middle America - Geography Match the Region with the Correct Des.docx
helpp Middle America - Geography Match the Region with the Correct Des.docx
 
HELPPP 4- Examine the figure above and answer the following- Specifica.docx
HELPPP 4- Examine the figure above and answer the following- Specifica.docxHELPPP 4- Examine the figure above and answer the following- Specifica.docx
HELPPP 4- Examine the figure above and answer the following- Specifica.docx
 
Help with Java! Can someone check my code What I am trying to accompli.docx
Help with Java! Can someone check my code What I am trying to accompli.docxHelp with Java! Can someone check my code What I am trying to accompli.docx
Help with Java! Can someone check my code What I am trying to accompli.docx
 
help me to answer for assignment- my course name is advanced diploma.docx
help me to  answer for assignment- my course name is advanced diploma.docxhelp me to  answer for assignment- my course name is advanced diploma.docx
help me to answer for assignment- my course name is advanced diploma.docx
 
help me answer the questions please Health Care Associated Disease Tr.docx
help me answer the questions please  Health Care Associated Disease Tr.docxhelp me answer the questions please  Health Care Associated Disease Tr.docx
help me answer the questions please Health Care Associated Disease Tr.docx
 
Hello- Below is my E-R Diagram- I need to change two items- 1- Based o.docx
Hello- Below is my E-R Diagram- I need to change two items- 1- Based o.docxHello- Below is my E-R Diagram- I need to change two items- 1- Based o.docx
Hello- Below is my E-R Diagram- I need to change two items- 1- Based o.docx
 
hello can someone give me a good discription on this ( What are Lichen.docx
hello can someone give me a good discription on this ( What are Lichen.docxhello can someone give me a good discription on this ( What are Lichen.docx
hello can someone give me a good discription on this ( What are Lichen.docx
 
Hartford's assets is unchanged- what happens to Hartford's equity cost.docx
Hartford's assets is unchanged- what happens to Hartford's equity cost.docxHartford's assets is unchanged- what happens to Hartford's equity cost.docx
Hartford's assets is unchanged- what happens to Hartford's equity cost.docx
 
Gymnosperms produce a large amount of pollen because gymnosperms rely.docx
Gymnosperms produce a large amount of pollen because gymnosperms rely.docxGymnosperms produce a large amount of pollen because gymnosperms rely.docx
Gymnosperms produce a large amount of pollen because gymnosperms rely.docx
 
Harry (69) and Lisa (66) are married- They filed separate returns and.docx
Harry (69) and Lisa (66) are married- They filed separate returns and.docxHarry (69) and Lisa (66) are married- They filed separate returns and.docx
Harry (69) and Lisa (66) are married- They filed separate returns and.docx
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 

I am getting error on line 15 This is what I got but I'm getting an.docx

  • 1. 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]<minInt minInt=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!