"Good afternoon, we're gonna have a great jump today!"
"See you later, dudes!"
ooh man!! i love finding nemo!!
p/s: image is copyright of Eric Cheng.. i found it on Digg.com
arsenal, bukan arsenal, life, live, computer, network, biasa, luar biasa, semuanya
"Good afternoon, we're gonna have a great jump today!"
"See you later, dudes!"
iftitah's 2009 resolutioniftitah this year
6. change my ringtone (noooo!!! i love you discovery channel! i love u!)
5. do something new (err?!)
4. go vacation (sipadan? bali? infinite-loop?)
3. meet 'crazy' people & tell them how 'crazy' they are (obama? steve jobs? tyler durden?)
2. get a life (get married?! hurm..)
1. be a hero (hiro nakamura?)
0. change the world
iftitah's wishlist for 2009 (from yang almost impossible ke yang most probable)
6. a full time gf who can stand & understand me (anyone?!) << she made me smile everyday :)
5. nikon d90 + nikkor 50mm f1.8d + crumpler (huu..berangan!!) << shoot mahal!!!
4. laptop baru + crumpler salary sacrifice (isk..) << macbook from the compan
3. jersi meriambuluh next season (kalau lawa.. then beli tak menang, wachaaa!!) << tak jadi beli
2. beanbags extra large (sunat yg dituntut) << too expensive
1. jumbo pixel led alarm clock from homeloo.com (wajib.. yeah!!) << susah nak import
0. tshirt "there's no place like 127.0.0.1" from thinkgeek.com (of course!!!) << shoot!! totally forgot!!!!
/*******************************
this is a simple calculator
________________________________
created by Ma.D iftitah
********************************/
#include<stdio.h>
#include<stdbool.h>
int main()
{
float xFirstValue, ySecondValue;
char xOperation;
bool xCondition;
//when xCondition is a boolean, 1 = True, 0 = False
xCondition = 0;
//the while-loop
while (xCondition != 1) {
//program will ask user to enter the value of x
printf("please enter first value: \n");
scanf("%f", &xFirstValue);
fpurge(stdin);
//program will ask user to select the operation here ( +, -, x, / )
printf("\nplease select an Operation: \n");
scanf("%c", &xOperation);
fpurge(stdin);
//program will ask user to enter the value of y
printf("please enter second value: \n");
scanf("%f", &ySecondValue);
fpurge(stdin);
//program will check and calculate based on operation that user selected
//for example x + y = z
if (xOperation == '+') {
printf("\n%f + %f = %f\n", xFirstValue, ySecondValue, xFirstValue + ySecondValue);
}
else if (xOperation =='-'){
printf("\n%f - %f = %f\n", xFirstValue, ySecondValue, xFirstValue - ySecondValue);
}
else if (xOperation =='*'){
printf("\n%f * %f = %f\n", xFirstValue, ySecondValue, xFirstValue * ySecondValue);
}
else if (xOperation == '/'){
printf("\n%f / %f = %f\n", xFirstValue, ySecondValue, xFirstValue / ySecondValue);
}
else {
xCondition = 1;
}
}
//tell the user that the operation selected not valid and program will terminate
printf("\n\nOPERATION NOT VALID. PROGRAM TERMINATED\n\n");
//end of program
return 0;
}