Ask Experts Questions for FREE Help!
Answer   ||    Advanced Search

Ask your question or search...
International Sites: Nederlandse experts vragen
User Name 
Password 
Join   Forgot password? 

Home > Computers & Technology > Programming > Other Programming   »   Write basic Pseudo code If-t

Question
 
 
#1  
Old Nov 7, 2009, 06:23 AM
Khmergurl1001
New Member
Khmergurl1001 is offline
 
Join Date: Nov 2009
Posts: 1
Khmergurl1001 See this member's comment history on his/her Profile page.
Write basic Pseudo code If-t

WRITE the basic pseudo code IF-THEN-ELSE statement for each of the following:

 

1. If sum is greater than 100, print sum.
2. If sum is greater than 5, print sum else add 10 to sum.
3. If grade is greater than or equal to 90, print “A” else if grade is greater than or equal 80, print “B”, else print “F”.

Reply With Quote
 
     

Answers
 
 
Old Nov 7, 2009, 07:11 AM   #2  
Engineering & Electronics Expert
KeepItSimpleStupid is offline
 
KeepItSimpleStupid's Avatar
 
Join Date: Aug 2007
Posts: 9,358
KeepItSimpleStupid See this member's comment history on his/her Profile page.KeepItSimpleStupid See this member's comment history on his/her Profile page.KeepItSimpleStupid See this member's comment history on his/her Profile page.KeepItSimpleStupid See this member's comment history on his/her Profile page.KeepItSimpleStupid See this member's comment history on his/her Profile page.KeepItSimpleStupid See this member's comment history on his/her Profile page.
This probelm is really odd, because I consider those statements pseudocode. The only thing I can think of is that someone wants s you to substitute logical expressions for the conditionals:

e.g.


2. If sum is greater than 5, print sum else add 10 to sum.

If sum > 5 then print sum else sum = sum +10
  Reply With Quote
 
     
 
 
Old Nov 7, 2009, 10:00 AM   #3  
Ultra Member
Perito is offline
 
Perito's Avatar
 
Join Date: Feb 2009
Location: USA
Posts: 2,893
Perito See this member's comment history on his/her Profile page.Perito See this member's comment history on his/her Profile page.
KISS is quite correct. The pseudo-code is already there. You might format it into something like this:

1. If sum > 100 then
.......Print sum
2. If sum > 5 then
.......Print sum
.....Else
.......Add 10 to Sum
3. If Grade > 90 then
.......Print "A"
.....Else if Grade > 80 then
....... etc.
  Reply With Quote
 
     

Your Answer
Email me when someone replies to my answer
Join Login



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Ask your question or search...



Similar Threads
visual basic code for calculator
(2 replies)
Visual Basic Code
(3 replies)
modular progams (pseudo-code algorithm)
(1 replies)
Code 19 - Vista Home Basic
(16 replies)
Visual basic code programming
(0 replies)

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Search this Thread

Advanced Search

Bookmarks





Copyright ©2003 - 2009, Ask Me Help Desk.
All times are GMT -8. The time now is 12:36 AM.