Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
1
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#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; }
gcc
9
Show compiler warnings
[
+
] Compiler args
[
-
]
Show input
Compilation time: 0.13 sec, absolute running time: 0.1 sec, cpu time: 0.04 sec, memory peak: 3 Mb, absolute service time: 0,31 sec
edit mode
|
history
|
discussion