Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,345 members, 7,819,222 topics. Date: Monday, 06 May 2024 at 12:56 PM

Please Help Me With This Assignment - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Please Help Me With This Assignment (1413 Views)

Please Help Me With This Assignment / Help With This Assignment Please.. / Hello Programmers, Please I Need You Help With This Assignment (2) (3) (4)

(1) (Reply) (Go Down)

Please Help Me With This Assignment by Deasegun19(m): 12:12am On Dec 04, 2016
1. Write a program to compute odd numbers from 7 to 90
2. Design an Algorithm to compute even numbers from 0 to 100

In Qbasic
Re: Please Help Me With This Assignment by Donald3d(m): 12:23am On Dec 04, 2016
Deasegun19:
1. Write a program to compute odd numbers from 7 to 90
2. Design an Algorithm to compute even numbers from 0 to 100

Program in what language , .....scrap that ..... it doesn't matter thats why love programming ,your language shouldn't limit you....back to the topic.I wont use any language , let me just give something like a pseudocode

For Lumba 1 grin

#You can use a while loop to just add number two to every number starting from 7 and print it out
x=7
while(x<90) {

x=x+2
#increment x by 2 starting from 7
echo/print/display x


}




#Another solution is to loop through all numbers between 7 and 90 and print the ones that are NOT divisible by two




For Lumba 2 grin
Its quite similar to the first one
Assign a variable first to the first number which is zero
Increment
Make a loop through all the numbers while its less than 100
Check each of the number if its divisible by 2


I hope i answered well ,

2 Likes

Re: Please Help Me With This Assignment by Deasegun19(m): 12:33am On Dec 04, 2016
Donald3d:


Program in what language , .....scrap that ..... it doesn't matter thats why love programming ,your language shouldn't limit you....back to the topic.I wont use any language , let me just give something like a pseudocode

For Lumba 1 grin


thanks bro...in Qbasic









typing ............
Re: Please Help Me With This Assignment by Deasegun19(m): 12:41am On Dec 04, 2016
thanks so much Donald3d for ur answer...Jah bless
Re: Please Help Me With This Assignment by Donald3d(m): 12:44am On Dec 04, 2016
Deasegun19:
thanks so much Donald3d for ur answer...Jah bless
u welcome wink
Re: Please Help Me With This Assignment by yahoofak(m): 9:18am On Dec 04, 2016

cls
if j>0 then else let j=0 endif
for i=7 to 90
if i%2>0 then
let n=i+j
print i;" + ";j;" = "; n
let j=n else endif
next i
end


cls
if j>0 then else let j=0 endif
for i=0 to 100
if i%2=0 then
let n=i+j
print i;" + ";j;" = "; n
let j=n else endif
next i
end

1 Like

Re: Please Help Me With This Assignment by Deasegun19(m): 6:52am On Dec 05, 2016
Thanks yahoofak
Re: Please Help Me With This Assignment by yahoofak(m): 6:55pm On Dec 05, 2016
You are welcome

(1) (Reply)

Optional Things You Need To Learn As A Laravel Developer / Check Here For Free Python Tutorials / Moat Academy: Celebrating Two Years Of Raising Remarkable Software Developers

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.