Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
1
#include <stdio.h> int i=0; int a[], s[], d[], f[]; int w=0, e=0, t=0; int main(void) { srand ( time(NULL) ); printf("chislo komand\n"); scanf("%d", &i); for (int q=0; q<i; q++){ //printf("%d", q); a[q] = rand() %i; s[q] = rand() %i*1.5; d[q] = rand() %i*2; printf ("team %d: gold - %d silver - %d bronze -%d\n", q+1, a[q], s[q], d[q]); e=a[q]+s[q]+d[q]; //printf("team %d collect %d medals\n", q+1, e); if (w < e) w=e; t=q+1; } printf("best score %d medals - team %d", w, t); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
GCC supports 128-bit integer arithmetic
B_141128_MatricesSuma
b=1,c=1
3468
B_141125_Repetidos
light blue zoda
data types and printf
est
hello kous
CstructProduct
Please log in to post a comment.