10/11/2017

DCT1144 Programming Fundamentals LAB 11 Sept 2017

Write a program to process a collection of daily high temperatures. Your program should count and print the number of hot days (high temperature 85 or higher), the number of pleasant days (high temperature 60-84), and the number of cold days (high temperatures less than 60). It should also display the category of each temperature. Test your program on the following data:
55 62 68 74 59 45 41 58 60 67 65 78 82 88 91 92 90 93 87 80 78 79 72 68 61 59

10/08/2017

DCT1144 Programming Fundamentals LAB 9 Sept 2017

1. Print the following output using a C++ program


5   4   3   2   1
5   4   3   2   1
5   4   3   2   1
5   4   3   2   1

2. Print the following output using a C++ program

1
1   2
1   2   3
1   2   3   4
1   2   3   4   5


3.  Print the following output using a C++ program






4. Print the following output using a C++ program


5.Print the following output using a C++ program

 6. Print the following output using a C++ program










10/02/2017

DCT1144 Programming Fundamentals : Assignment 1


1. Write an algorithm and a C++  program that will calculate and print bills for the city power company. The rates vary depending on wheather the use is residential or commercial. A code R means residental use and  a code of C means commeercial use. Any other code should be treated as an error.
The rates are computes as follows:

R: RM5.00 Plus RM0.31 per KWH used
C: RM50.00 for the first 1000KWH and RM0.45 for each additional KWH.

Your program should prompt the user to enter an integer account number, the use code (type char), and the necessary consumption figures in whole numbers of kilowatt-hours. Your program should display the amount due for the user.


2. Write an algorithm and a C++ program that prompts the user to enter the number of students and each student's id and score, and finally displays the student with the highest score.

9/27/2017

DCT1144 Programming Fundamentals LAB 27 Sept 2017


1. SATU Terengganu applies the following water usage rate for their customer.

JADUAL PERKIRAAN KOD TARIF BEKALAN AIR
Enakmen PA. 51 Fasal 16 (UPEN.TR.5/115, DUN. TR. 15/25 SK.1)
MULAI 1 MAC 1997

Kod Jenis
Bacaan
Penggunaan Caj
Minima (RM)
Kuantiti M3
(Meter Padu)
Caj
Setiap M3
10 Rumahtangga 0 - 20.00 RM0.42 RM4.00 sebulan
20.1 - 40.00 RM0.65
40.1 - 60.00 RM0.90
60.1 ke atas RM1.00


Draw a flowchart to calculated the net amount of the bill for each consumer and print it.

2. A TNB Power supply company charges the following rates to their customers:-
Draw a flowchart and write a C++ program to calculated the net amount of the bill for each consumer and print it.


TARIFF CATEGORY UNIT CURRENT RATE (1 JAN 2014)
1. Tariff A - Domestic Tariff
For the first 200 kWh (1 - 200 kWh) per month sen/kWh 21.80
For the next 100 kWh (201 - 300 kWh) per month sen/kWh 33.40
For the next 300 kWh (301 - 600 kWh) per month sen/kWh 51.60
For the next 300 kWh (601 - 900 kWh) per month sen/kWh 54.60
For the next kWh (901 kWh onwards) per month sen/kWh 57.10
The minimum monthly charge is RM3.00  

9/24/2017

DCT1144 Programming Fundamentals LAB 25 Sept 2017

1.    Write a C++ program to input three integers and print the largest.




2.    A bicycle shop in a city hires bicycles by the day at different rates for different model below:

Model No.               Hire rate per Day (RM)
Model No. 1            14.00
Model No. 2            12.00
Model No. 3            10.00


In order to attract customers, the shopkeeper gives a discount on the number of days a bicycle is hired for. The policy of discount is as given below:

No. of days          Discount rate (%)
1-5                            0.00
6-10                           8
11 and over              15

Option 1

Option 2


9/18/2017

BCS1013 Lab 21 Sept 2017


1. Design an algorithm and write a C++ program  that prompts the user to input a number. The program should then output the number and a message saying whether the number is positive, negative, or zero.


2. Design an algorithm and write a C++ program  that prompts the user to input two numbers. The program should then output the numbers in ascending order.


3. Design an algorithm and write a C++ program  that prompts the user to input three numbers. The program should then output the numbers in ascending order.

4. Run the following program using several input such as 163, 200, 35.\

#include
#include
#include

using namespace std;

int main(int argc, char *argv[])
{
    int  RM, RM100 , RM50, RM10 , RM20, RM5, RM1 ,Baki ,Baki1, Baki2, Baki3;
    cout << "RM ";
    cin >> RM;
    RM100 = RM/100;
    Baki = RM%100;
    RM50 = Baki/50;
    Baki1 = Baki%50;
    RM20 = Baki1/20;
    Baki2 = Baki1%20;
    RM10 = Baki2/10;
    Baki3 = Baki2%10;
    RM5 = Baki3/5;
    RM1 = Baki3%5;
   
    cout << "Amount of RM100: " << RM100 << endl;
    cout << "Amount of RM50: " << RM50 << endl;
    cout << "Amount of RM20: " << RM20 <    cout << "Amount of RM10: " << RM10 << endl;
    cout << "Amount of RM5: " << RM5 << endl;
    cout << "Amount of RM1: " << RM1 << endl;
   
    system("PAUSE");
    return EXIT_SUCCESS;
}
 

DCT1144 Programming Fundamentals LAB 18 Sept 2017


1. Design an algorithm and write a C++ program that reads a Weight and Height, then calcculate BMI and  displays the result . The formula for the BMI is as follows:
BMI = Weight / (Height x Height);


 2. Design an algorithm and write a C++ program that reads in the radius and length of a cylinder and computes its volume using the following formulas:
area = radius * radius * pi
volume = area * length

(pi = 3.14)


References

Flowchart Application - https://www.draw.io/
Flowchart Draw- Guide https://www.programiz.com/article/flowchart-programming
Pseudo code Guide- http://study.com/academy/lesson/pseudocode-definition-examples-quiz.html

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.  ...