Your Status: Logged out Log in

Designing and Writing a Program  

Member rating: No Rating | Words: | Submitted: Mon Aug 18 2003

Page Preview
Preview
Previous 1 of 6 Next

On the left is an image preview of every page of this document, and below are the first 150 words with formatting removed:

Task - Designing and Writing a Program Problem Input Process Output Breadth Height Length Breadth*Height*Length=Volume Volume Write a program to calculate the volume of a cuboid. The program should assign values for the length, height and breadth and the result should be displayed on the screen ten times. 1) INPUT, PROCESS, OUTPUT TABLE 2) PROGRAM IN PSEUDO CODE Level 1 1. assign the values 2. calculate the volume 3. display the result Level 2 1.1 assign a value to the variable breadth 1.2 assign a value to the variable height 1.3 assign a value to the variable length 1.4 assign a value to the variable volume 2.1 volume = breadth*height*length 3.1 display the result 3) PROGRAM IN VISUAL BASIC Sub Command1_Click() assign_values calculate_volume_of_cube display_result End Sub Sub assign_values() breadth_of_cube = InputBox("Key in the breadth_of_cube") height_of_cube = InputBox("Key in the height_of_cube") length_of_cube = InputBox("Key in the length_of_cube") End Sub Sub calculate_volume_of_cube() volume_of_cube = breadth_of_cube * height_of_cube * length_of_cube End Sub Sub display_result() Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print...

Get instant access



  • Instant, unlimited access to our documents in full
  • Swap your work for free access, or pay £4.99
  • To see the full version of this document and 147,228 others
Register Now
OR

Receive email updates for this category



  • Simply tell us your email address and receive a weekly Study Help Email for FREE
  • Receive 3 FREE essay views with each email
  • Get all the latest essays from Coursework.Info & discussion from TheStudentRoom.co.uk