| C programming exercise. | |
|
|
Author | Message |
---|
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: C programming exercise. Mon Jul 26, 2010 1:19 am | |
| - Code:
-
#include <stdio.h>
int main(void) { int enter_minutes,hours,minutes printf("Enter minutes:"); scanf("%d",&enter_minutes); hours = enter_minutes / 60; minutes = enter_minutes % 60; printf("%d minutes is equal to %d hours and %d minutes.",enter_minutes,hours,minutes);
return 0; }
| |
|
| |
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: Re: C programming exercise. Mon Jul 26, 2010 1:23 am | |
| - Code:
-
#include <stdio.h> #define pi 3.142
int main(void) { int radius,height,base,volume printf("Enter radius of the cone (cm): \n\n"); scanf("%d",&radius); printf("Enter height of the cone (cm): \n\n"); scanf("%d",&height); base = pi * radius; volume = (1.0/3.0) * base * height; printf("The volume of the cone is: %d",volume);
return 0; }
| |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| Subject: Re: C programming exercise. Mon Jul 26, 2010 1:36 am | |
| ape lagi bug ko bagi ni fuck!! | |
|
| |
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: Re: C programming exercise. Mon Jul 26, 2010 12:25 pm | |
| bukan bug la..ni coding exercise lab aku blaja.aku dah siap aku taruk kat forum ni.kang kat lab nnti nk wat...aku copy paste pastu siap.hahaha..pastu fucking la.hahaha..
nnti aku wat bug pakai msdos.delete windows hahaha chaos x pon duplicate file windows pastu paste kat desktop infinitely.smokeweat akan chaos. nak lagi motherfucker bendalah ni aku set dia run masa startup | |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| Subject: Re: C programming exercise. Mon Jul 26, 2010 6:35 pm | |
| fuck ko jay!!!nice one daron!!!keep it up | |
|
| |
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: Re: C programming exercise. Mon Jul 26, 2010 6:49 pm | |
| nnti aku post code dia kalu dah siap | |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| Subject: Re: C programming exercise. Tue Jul 27, 2010 12:55 am | |
| ok2...aku tgg | |
|
| |
tyrapeeps
Number of posts : 2 Age : 32 Localisation : PD/Sunway Registration date : 2010-07-26
| Subject: Re: C programming exercise. Tue Jul 27, 2010 11:14 pm | |
| jay, ko amik course apa damnit? | |
|
| |
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: Re: C programming exercise. Tue Jul 27, 2010 11:15 pm | |
| aku amek software engineering.. | |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| Subject: Re: C programming exercise. Wed Jul 28, 2010 12:59 am | |
| haha...nice pasni leh ko prank system internet plak | |
|
| |
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: Re: C programming exercise. Wed Jul 28, 2010 9:05 pm | |
| hahaha..tu la plan nye.. wokayh! kod baru siap. - Code:
-
#include <stdio.h> int main(void) { int year,salary,total,counter = 0; char status; while(counter < 1) { printf("Enter "F" if you work Full-time or Enter "P" if you work Part-time.\n"); printf("Please Enter your current status: "); scanf("%c",&status); printf("\nHow many years have you service to the company?\n"); printf("Please Enter your years of service: "); scanf("%d",&year); printf("\nHow much is your salary?\n"); printf("Please Enter your salary: "); scanf("%d",&salary);
if( (status == 'F' || status == 'f') && year < 5 ) { total = (0.04 * salary) + salary; printf("\nYour new salary is: RM %d\n\n",total); } else if( (status == 'F' || status == 'f') && year >= 5 ) { total = (0.05 * salary) + salary; printf("\nYour new salary is: RM %d\n\n",total); } else if( (status == 'P' || status == 'p') && year < 5 ) { total = (0.025 * salary) + salary; printf("\nYour new salary is: RM %d\n\n",total); } else if( (status == 'P' || status == 'p') && year >= 5 ) { total = (0.03 * salary) + salary; printf("\nYour new salary is: RM %d\n\n",total); } else { printf("\nInvalid input!\n\n"); } counter+= 1; } return 0; }
| |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| Subject: Re: C programming exercise. Wed Jul 28, 2010 11:31 pm | |
| bagus!!! | |
|
| |
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: Re: C programming exercise. Thu Jul 29, 2010 12:38 am | |
| ni kod exercise klass aku la..bukan bug | |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| Subject: Re: C programming exercise. Thu Jul 29, 2010 4:43 pm | |
| aku tau la asshole!!kan ko dah penah cakap aritu motherfucker!!! haha!! | |
|
| |
JaVS_v2.5 Admin
Number of posts : 155 Age : 33 Localisation : vision homes seremban 2 Registration date : 2007-06-26
| Subject: Re: C programming exercise. Wed Aug 04, 2010 10:45 pm | |
| Haha..wtf..igt ko x tau..... kk2 jgn wat asshole!!!!!! | |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| Subject: Re: C programming exercise. Thu Aug 05, 2010 3:07 am | |
| haha...yala asshole..aku tau la dammit!!! | |
|
| |
nazirulez Recruit
Number of posts : 20 Localisation : 6th Hell Registration date : 2007-09-25
| Subject: Re: C programming exercise. Sun Aug 08, 2010 10:52 am | |
| tu code amende asshole???self-destruction kew pew?? tgk pon mcm fuck ar pening... | |
|
| |
smoke_weat BORON!!
Number of posts : 183 Age : 32 Localisation : rising suns Registration date : 2007-08-16
| |
| |
Sponsored content
| Subject: Re: C programming exercise. | |
| |
|
| |
| C programming exercise. | |
|