Write an algorithm (either flowchart or pseudocode) and java program for each of the following problem.
1. (Counting positive and negative numbers and computing the average of numbers) Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values. Your program ends with the input 0.
2. (Summing a series) Write a program to sum the following series:
3. Write a test program that prompts the user to enter the investment amount (e.g., 1000) and the interest rate (e.g., 9%), and print a table that displays future value for the years from 1 to 30, as shown below:
The amount invested: 1000
Annual interest rate: 9%
Years Future Value
1 1093.8
2 1196.41
...
29 13467.25
30 14730.57
9/30/2013
9/29/2013
9/25/2013
DCT1083 Programming Fundamentals Lab 26 sept 2013
Write function headers for the following functions:
- Computing a sales commission, given the sales amount and the commission rate.
- Printing the calendar for a month, given the month and year.
- Computing a square root.
- Testing whether a number is even, and returning true if it is.
- Printing a message a specified number of times.
- Computing the monthly payment, given the loan amount, number of years, and annual interest rate.
9/23/2013
DCT 1043 COA : Contoh Test 1
Test 1 pelajar 1 IT akan di adakan pada ketetapan berikut:-
*Tarikh : 2/10/2013
*Masa : 8:15pm -9:15pm (MALAM)
Tempat : Threathre A
* jika tarikah dan masa di atas berlaku pertindihan dengan jadual lain-sila maklumkan pada saya.
Topik dan contoh soalan ada seperti berikut:-
Chapter 1 - Intro
Explain the following terms :- CPU, memory, input devices, and output devices.
Why computer use binary systems, not the hexadecimal.
What is BUS and what is its function?
Chapter 2 - CPU
The architecture of central processing unit consists of *three main parts. List and briefly explain each of them.
*Control unit (CU),Arithmetic and Logic unit (ALU),Registers
Chapter 3 - Memory
Differenciate Main Memory and Secondary Memory.Why do computer need both?
Explain memory hierarchy with suitable example
Explain Volatile and Nonvolatile memory in details.
What is cache memory?
*Tarikh : 2/10/2013
*Masa : 8:15pm -9:15pm (MALAM)
Tempat : Threathre A
* jika tarikah dan masa di atas berlaku pertindihan dengan jadual lain-sila maklumkan pada saya.
Topik dan contoh soalan ada seperti berikut:-
Chapter 1 - Intro
Explain the following terms :- CPU, memory, input devices, and output devices.
Why computer use binary systems, not the hexadecimal.
What is BUS and what is its function?
Chapter 2 - CPU
The architecture of central processing unit consists of *three main parts. List and briefly explain each of them.
*Control unit (CU),Arithmetic and Logic unit (ALU),Registers
Chapter 3 - Memory
Differenciate Main Memory and Secondary Memory.Why do computer need both?
Explain memory hierarchy with suitable example
Explain Volatile and Nonvolatile memory in details.
What is cache memory?
9/18/2013
DCT1083 : Assignment 2
PART A
1.
Fill in the third column in the following tables:
expression1
|
expression2
|
expression1 ||
expression2
|
false
|
false
|
|
false
|
true
|
|
true
|
false
|
|
true
|
true
|
|
expression1
|
expression2
|
expression1 && expression2
|
false
|
false
|
|
false
|
true
|
|
true
|
false
|
|
true
|
true
|
|
PARTB
1.
Write a program to output even
numbers 1 to 20 using three types of loop statement (while, do-while and for)
in three seperate program.
2. Write a program that input ten (10)
integers. Print out the sum of those integers.
2.1 Pseudocode
2.2 Flowchart
2.3 C++ Program
9/04/2013
DCT1083 Prog Fundamentals: Lab 5/9/2013
Lab DCT1083 5/9/2013
a) Write a program to output integer 1 to 10 . Start with a pseudocode and flowchart.
b) Write a program that asks the user to INPUT 10 integers and writes the sum of these integers. Start with a pseudocode and flowchart.
c) Write a program that read 10 integers. Find the maximum number among the 10 (hint: use selection statements together with looping statements). Start with a pseudocode and flowchart.
Solution
a) Flowchart
a) Pseudocode
a) C++ Program
a) Write a program to output integer 1 to 10 . Start with a pseudocode and flowchart.
b) Write a program that asks the user to INPUT 10 integers and writes the sum of these integers. Start with a pseudocode and flowchart.
c) Write a program that read 10 integers. Find the maximum number among the 10 (hint: use selection statements together with looping statements). Start with a pseudocode and flowchart.
Solution
a) Flowchart
a) Pseudocode
a) C++ Program
9/01/2013
DCT1083 Programming Fundamentals : Assignment 1 Comments
Subscribe to:
Posts (Atom)
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. ...
-
ANSWERS TO CHAPTER EXERCISES (CHAPTER 8) Review Questions 1. List and describe various types of output, including technolog...
-
Based on real life scenario on any local company/ organization which you are very familiar, define the problem that could be addressed thr...
-
A. Response to the following statements by circling either T (TRUE) or F (FALSE). [10M] I. 1. Java enables users...