cis790assignment 1 -ramesses fuentes

3
Ramesses Fuentes 2/12/2015 Assignment 1 – CO INFO 790 1. Write the steps that will allow ask the user for two numbers. Add these numbers and print out the answer DIM NUMBER 1 DIM NUMBER 2 DIM TOTAL NUMBER PRINT “ENTER FIRST NUMBER” INPUT NUMBER 1 PRINT “SECOND FIRST NUMBER” INPUT NUMBER 2 Total = Number 1 + Number 2 Total = 1010001 + 1010010 PRINT TOTALNUMBER 2. Write the steps that will allow ask the user for two numbers. Multiple these numbers then divide the product by two and print out the answer DIM NUMBER 1 DIM NUMBER 2 DIM TOTAL NUMBER PRINT “ENTER FIRST NUMBER” INPUT NUMBER 1 PRINT “ENTER SECOND NUMBER” INPUT NUMBER 2 TOTAL = ( NUMBER 1 * NUMBER 2 ) / 2 TOTAL = TOTAL / 2 PRINT TOTALNUMBER

Upload: ramesses-fuentes

Post on 21-Nov-2015

218 views

Category:

Documents


1 download

DESCRIPTION

Example of Basic Java psuedo-code and the syntax involved,

TRANSCRIPT

Ramesses Fuentes 2/12/2015Assignment 1 CO INFO 7901. Write the steps that will allow ask the user for two numbers.Add these numbers and print out the answerDIM NUMBER 1DIM NUMBER 2DIM TOTAL NUMBERPRINT ENTER FIRST NUMBERINPUT NUMBER 1PRINT SECOND FIRST NUMBERINPUT NUMBER 2Total = Number 1 + Number 2 Total = 1010001 + 1010010PRINT TOTALNUMBER2. Write the steps that will allow ask the user for two numbers. Multiple these numbers then divide the productby two and print out the answerDIM NUMBER 1DIM NUMBER 2DIM TOTAL NUMBERPRINT ENTER FIRST NUMBERINPUT NUMBER 1PRINT ENTER SECOND NUMBERINPUT NUMBER 2TOTAL = (NUMBER 1 * NUMBER 2) / 2TOTAL = TOTAL / 2PRINT TOTALNUMBER3. Write the steps to have the user input the person name, street address, city and state. Then print out the valuesDIM FIRSTNAMEDIM LASTNAMEDIM STREETADDRESSDIM CITYDIM STATEPRINT ENTER YOUR FIRST NAMEINPUT FIRSTNAMEPRINT ENTER YOU LAST NAMEINPUT LASTNAMEPRINT ENTER YOU FULL STREET ADDRESSINPUT STREETADDRESSPRINT ENTER YOUR CITYINPUT CITYPRINT ENTER YOUR STATEINPUT STATEPRINT FIRSTNAME + LASTNAME + STREETADDRESS + CITY + STATE4. Write the steps to solve the following equation. Answer = (A +B+C)*DDIM ADIM BDIM CDIM DDIM ANSWERPRINT WHAT IS THE FIRST NUMBERINPUT APRINT WHAT IS THE SECOND NUMBERINPUT BPRINT ENTER THE THIRD NUMBERINPUT CPRINT WHAT IS THE FOURTH NUMBERINPUT DANSWER = (A + B + C) * DPRINT ANSWERWere the user inputs the values for the variables A, B, C, D and the program output the answer.