Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Vzdalenost
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> #include <math.h> //sqrt = odmocnina double vzdalenost(double aX, double aY) //aX a aY jsou argumenty funkce { //return 42; //musí tady být 42?// 42 je odpoved na smysl zivota return sqrt((aX * aX) + (aY * aY)); } int main(void) { printf("Zadejte hodnoty X a Y\n"); double x, y; if(scanf("%lf%lf", &x, &y) != 2) //vraci pocet nactenych parametru { printf("Neplatny vstup, konec programu"); return 1; } printf("x: %lf, y: %lf\n", x, y); double r = vzdalenost(x, y); printf("\nVysledna vzdalenost je: %lf\n", r); return 0; } //-Wall -std=gnu99 -O2 -o a.out source_file.c -lm // ^^^ //do clangu dopsat do compiler args ----------||| #if 0 Zlatej assembler já assembluju tak maximálně LEGO LULW #endif
clang
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion