This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [T] = test() | |
%Arrival Time | |
A = [ 2.17, 7.90, 15.00, 15.17, 15.73,... | |
18.74, 19.86, 22.51, 23.70, 31.06]; | |
%Begin service | |
W = [0 0 0 0 0 0 0 0 0 0]; | |
%Service Time | |
S = [0.10, 4.46, 3.25, 2.26, 4.12, 0.69, 0.77, 3.48, 0.26, 0.41]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*===================================================================== | |
+-------------------------------------------------------------------+ | |
| | | |
| Example how to read "Hello World" from stdin | | |
| | | |
| The main problem with scanf() is it unable to read properly | | |
| a string that have "space" character. | | |
| | | |
| This example will show how to read a string that have "space" | | |
| character. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
/********************* price_after_discount() *********************** | |
* Find the price of an item after the discount | |
* | |
* @argument1: price = item price. | |
* @argument2: discount = percentage of discount. | |
* | |
* @return: item price after discount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How the GNU GCC compiler calculate the equation: | |
x + ++y - x * ++x - --y | |
The algorithm used when perform this computation may be different across | |
compilers. This program is compiled using compiler GNU GCC 4.8.3 built for | |
Red Hat 4.8.3-7. Tools that are used to reverse engineer or disassemble | |
this program are "objdump" and "GNU GDB debugger". | |
The program will solve the following problem: | |
x + ++y - x * ++x - --y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
int x = 2; | |
int z = 0; | |
z = ++x + ++x + ++x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class test { | |
public static void main(String[] args) { | |
int x = 2; | |
int z = 0; | |
z = ++x + ++x + ++x; | |
System.out.printf("z = %d\n",z); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-------------------------------------------------------------------- | |
| TITLE: Calculate age | |
+-------------------------------------------------------------------- | |
| AUTHOR: Nik Mohamad Aizuddin b. Nik Azmi | |
| EMAIL: nickaizuddin93@gmail.com | |
| DATE CREATED: 12/NOV/2014 | |
| PURPOSE: My answer for the subject Programming Technique | |
| 2014/2015 Semester 1 Labsheet 4. | |
+-------------------------------------------------------------------- | |
| LANGUAGE: C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ========================================================== | |
# This script requires user to input the weight | |
# of the lettuce. The output of the script | |
# will display the total amount of price base | |
# on the weight (Assume that 1kg is RM2.50). | |
# | |
# Sample output will be: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ruby | |
# ========================================================== | |
# This script requires user to input the weight | |
# of the lettuce. The output of the script | |
# will display the total amount of price base | |
# on the weight (Assume that 1kg is RM2.50). | |
# | |
# Sample output will be: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/perl | |
# ========================================================== | |
# This script requires user to input the weight | |
# of the lettuce. The output of the script | |
# will display the total amount of price base | |
# on the weight (Assume that 1kg is RM2.50). | |
# | |
# Sample output will be: | |
# |
OlderNewer