calculator salary of weekend | C code

#include<stdio.h> #include<conio.h> #include<stdlib.h> main() { int i,w; int week[5]; int hour[5]; int work0=0,work1=0,work2=0,work3=0; { for(i=1;i<=4;i++) { printf("Work0 [Week%d]= ",i); scanf("%d",&hour[i]); work0=work0+hour[i]; printf("Work1 [Week%d]= ",i); scanf("%d",&hour[i]); work1=work1+hour[i]; printf("Work2 [Week%d]= ",i); scanf("%d",&hour[i]); work2=work2+hour[i]; printf("Work3 [Week%d]= ",i); scanf("%d",&hour[i]); work3=work3+hour[i]; system("cls"); } } printf("Work0 = %d\n",work0*20); printf("Work1 = %d\n",work1*25); printf("Work2 = %d\n",work2*30); printf("Work3 = %d\n",work3*35); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.