8/08/2010

BCS2234 Assignment 1

You are required to provide (i) Algorithm (Flowchart or Pseudocode) and (ii) Java program for each of the following problems.

1. Develop a program to input height and length of a right triangle and calculate and print the area of a right triangle.

Area of right triangle = (height x length) /2

1.1 Algorithm

1.2 Java Program

2. Write a program that prompts for and read your age in years and output your ages in days. You may assume that there are 365 days in a year.

2.1 Algorithm

2.2 Java Program

3.. Write a program that input a grade. If the grade is less than 0 or greater than 100, your program should print the appropriate message informing the user that an invalid grade has been entered.

3.1 Algorithm

3.2 Java Program

4. Write a program that read an integer from the user and determines and print whether it is odd or even (Hint: Use modulus operator)

4.1 Algorithm

4.2 Java Program

5. Write a program that input ten (10) integers. Print out the sum of those integers.

5.1 Algorithm

5.2 Java Program

No comments:

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...