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

ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 

Recently uploaded (20)

ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 

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!