SlideShare a Scribd company logo
1 of 2
(SciLab) Write a program that displays all numbers between input parameters "lower_limit"
and "upper_limit" that have at least one digit equal to '2'. Note: "lower_limit" and
upper_limit" are positive integers.
I need to write this in SciLab, I'm new to computer science and am still learning how to use it.
Solution
//Write a program that displays all numbers between input parameters "lower_limit" and
"upper_limit"
function d=displaynum(lower_limit,upper_limit)//function define
for d =lower_limit:upper_limit //range of numbers
disp(d) //display
end
endfunction
x=input('Enter Lower_limit positive integer')//prompt for input values
Enter Lower_limit positive integer 1
x=1
y=input('Enter Upper_limit positive integer')
Enter Upper_limit positive integer 5
y=5
d=displaynum(x,y)
sample output
1
2
3
4
5
(SciLab) Write a program that displays all numbers between input param.docx

More Related Content

Similar to (SciLab) Write a program that displays all numbers between input param.docx

PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
amrit47
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
gerardkortney
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdf
YashMirge2
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
alish sha
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docx
oswald1horne84988
 

Similar to (SciLab) Write a program that displays all numbers between input param.docx (17)

C code examples
C code examplesC code examples
C code examples
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
 
Operators1.pptx
Operators1.pptxOperators1.pptx
Operators1.pptx
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solution
 
B.Com 1year Lab programs
B.Com 1year Lab programsB.Com 1year Lab programs
B.Com 1year Lab programs
 
C++ manual Report Full
C++ manual Report FullC++ manual Report Full
C++ manual Report Full
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdf
 
Functions Practice Sheet.docx
Functions Practice Sheet.docxFunctions Practice Sheet.docx
Functions Practice Sheet.docx
 
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
 
keyword
keywordkeyword
keyword
 
keyword
keywordkeyword
keyword
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
L03vars
L03varsL03vars
L03vars
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docx
 
python practicals-solution-2019-20-class-xii.pdf
python practicals-solution-2019-20-class-xii.pdfpython practicals-solution-2019-20-class-xii.pdf
python practicals-solution-2019-20-class-xii.pdf
 

More from todd341

More from todd341 (12)

(23) Which of the following processes is a physical change- baking coo.docx
(23) Which of the following processes is a physical change- baking coo.docx(23) Which of the following processes is a physical change- baking coo.docx
(23) Which of the following processes is a physical change- baking coo.docx
 
(1) Write a comment on a significant violation of privacy for instance.docx
(1) Write a comment on a significant violation of privacy for instance.docx(1) Write a comment on a significant violation of privacy for instance.docx
(1) Write a comment on a significant violation of privacy for instance.docx
 
(1) Complete the MO diagram for CN by filling the table with the numbe.docx
(1) Complete the MO diagram for CN by filling the table with the numbe.docx(1) Complete the MO diagram for CN by filling the table with the numbe.docx
(1) Complete the MO diagram for CN by filling the table with the numbe.docx
 
(b) What ions were present in the following solutions before you added.docx
(b) What ions were present in the following solutions before you added.docx(b) What ions were present in the following solutions before you added.docx
(b) What ions were present in the following solutions before you added.docx
 
(Second picture is the preceding truth table) How do I complete the.docx
(Second picture is the preceding truth table)    How do I complete the.docx(Second picture is the preceding truth table)    How do I complete the.docx
(Second picture is the preceding truth table) How do I complete the.docx
 
#389 of Liquids Solutions-OP Which one of the following statements con.docx
#389 of Liquids Solutions-OP Which one of the following statements con.docx#389 of Liquids Solutions-OP Which one of the following statements con.docx
#389 of Liquids Solutions-OP Which one of the following statements con.docx
 
(i) In terms of bonding- explain why silicate materials have relativel.docx
(i) In terms of bonding- explain why silicate materials have relativel.docx(i) In terms of bonding- explain why silicate materials have relativel.docx
(i) In terms of bonding- explain why silicate materials have relativel.docx
 
(Accounting Info Systems) When designing a database why is it not pref.docx
(Accounting Info Systems) When designing a database why is it not pref.docx(Accounting Info Systems) When designing a database why is it not pref.docx
(Accounting Info Systems) When designing a database why is it not pref.docx
 
(6) Times interest earned ratio- (7) Return on common stockholders-' e.docx
(6) Times interest earned ratio- (7) Return on common stockholders-' e.docx(6) Times interest earned ratio- (7) Return on common stockholders-' e.docx
(6) Times interest earned ratio- (7) Return on common stockholders-' e.docx
 
(5 pts) Which of the following compounds are soluble in water- NH NO-.docx
(5 pts) Which of the following compounds are soluble in water- NH NO-.docx(5 pts) Which of the following compounds are soluble in water- NH NO-.docx
(5 pts) Which of the following compounds are soluble in water- NH NO-.docx
 
(30 pts-) How would you prepare 200 mL of a 2-0 M NaOH solution by dil.docx
(30 pts-) How would you prepare 200 mL of a 2-0 M NaOH solution by dil.docx(30 pts-) How would you prepare 200 mL of a 2-0 M NaOH solution by dil.docx
(30 pts-) How would you prepare 200 mL of a 2-0 M NaOH solution by dil.docx
 
(3) Issues and payments of debt (4) Purchases- sales- and exchanges of.docx
(3) Issues and payments of debt (4) Purchases- sales- and exchanges of.docx(3) Issues and payments of debt (4) Purchases- sales- and exchanges of.docx
(3) Issues and payments of debt (4) Purchases- sales- and exchanges of.docx
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 

Recently uploaded (20)

PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 

(SciLab) Write a program that displays all numbers between input param.docx

  • 1. (SciLab) Write a program that displays all numbers between input parameters "lower_limit" and "upper_limit" that have at least one digit equal to '2'. Note: "lower_limit" and upper_limit" are positive integers. I need to write this in SciLab, I'm new to computer science and am still learning how to use it. Solution //Write a program that displays all numbers between input parameters "lower_limit" and "upper_limit" function d=displaynum(lower_limit,upper_limit)//function define for d =lower_limit:upper_limit //range of numbers disp(d) //display end endfunction x=input('Enter Lower_limit positive integer')//prompt for input values Enter Lower_limit positive integer 1 x=1 y=input('Enter Upper_limit positive integer') Enter Upper_limit positive integer 5 y=5 d=displaynum(x,y) sample output 1 2 3 4 5