Please I Need Your Help On These Questions - Education - Nairaland
Nairaland Forum › Nairaland General › Education › Please I Need Your Help On These Questions (799 Views)
| Please I Need Your Help On These Questions by Punctual(op): 11:21am On Nov 03, 2017 |
To the programmers in the house,I need an answer to these qbasic questions 1) Given the following set of numbers 4,1,2,3,6,8,-4 and 9. Write a program that find the smallest and the largest out of the on numbers 2)Write a program to get the volume of a sphere |
| Re: Please I Need Your Help On These Questions by Okiem(m): 7:45am On Nov 04, 2017 |
These questions are very simple. I can help with the flowchart |
| Re: Please I Need Your Help On These Questions by Punctual(op): 10:56am On Nov 04, 2017 |
Okiem:Not the flowchart,can you help me with it in qbasic? |
| Re: Please I Need Your Help On These Questions by megasamuel(m): 10:59am On Nov 04, 2017 |
Punctual:I can't write in qbasic but could give a breakdown of the algorithm.. Then u can write in qbasic |
| Re: Please I Need Your Help On These Questions by Punctual(op): 11:35am On Nov 04, 2017 |
megasamuel:I'll gladly appreciate that, Thanks in anticipation |
| Re: Please I Need Your Help On These Questions by megasamuel(m): 1:44pm On Nov 04, 2017 |
Punctual:This won't be a typical algorithm, I'll try to explain I'll be using integers 1,2,3 for examples ... STEP 1: let Smallest(variable) =0 Let Largest(variable) = 0 STEP 2 : create an array of the integers example : (java) ints [] a = new ints[] a[0] = 1..etc STEP 3 : create a loop to read through the all in integers in the array example (java) = for( i=0; i<a.lenght-1; i++) Int i (this is the index of the integers in the array i Believe u know about those) STEP 4 : Create a loop for getting the largest ;this would be done by updating the value of largest(variable) if it is greater than the current Vallue(remember we're checking all the values so this part should be in the loop in step3) Example java) if (a[i] > largest) {largest = a[i] STEP 5 : create a similar loop for smallest STEP 6 : print largest and smallest If it's not understood u can take the post to the programming section where someone can write the code in qbasic for you |
| Re: Please I Need Your Help On These Questions by megasamuel(m): 1:52pm On Nov 04, 2017 |
Punctual:STEP 1: Input R(radius) (variable) STEP 2: Read A = 4/3 × 3.14 × R×R ×R STEP 3: Print A |
| Re: Please I Need Your Help On These Questions by Okiem(m): 3:38pm On Nov 04, 2017 |
Punctual:I have forgotten how codes are written in basic,however, I can help you answer these questions using another programming language. |
| Re: Please I Need Your Help On These Questions by Punctual(op): 3:28am On Nov 06, 2017 |
megasamuel:Thanks alot bro,really appreciate this |
| Re: Please I Need Your Help On These Questions by Punctual(op): 3:29am On Nov 06, 2017 |
megasamuel: |
| Re: Please I Need Your Help On These Questions by Punctual(op): 3:30am On Nov 06, 2017 |
megasamuel:I found it helpful. Thanks |
Help Me Solve These Questions • Helping My Son Prepare For Common Entrance...help With These Questions • Who Can Answer These Questions? • 2 • 3 • 4
Photos:college Of Education Akamkpa Old School Party 2017 • Just Got Admission? Here Are Some Things You Need To Take To Campus • All The Gurus, Please Help With This Quantitative Reasoning Question
java) if (a[i] > largest)