Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Zadanie Kolokwium 2013: Trójkąty i trójkąty
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 <iostream> using namespace std; int main() { int ile=0; scanf("%d",&ile); int bok[3]; for(int i=0;i<ile;i++) { for(int i=0;i<3;i++) { scanf("%d",&bok[i]); } if(((bok[0]+bok[1])>bok[2]) && ((bok[2]+bok[1])>bok[0]) && ((bok[0]+bok[2])>bok[1])) { if((bok[0]==bok[1]) && (bok[1]==bok[2]) && (bok[0]==bok[2])) { printf("ROWNOBOCZNY\n"); } else if((bok[0]==bok[1]) or (bok[1]==bok[2]) or (bok[0]==bok[2])) { printf("ROWNORAMIENNY\n"); } else { if(((bok[0]*bok[0]+bok[1]*bok[1])==bok[2]*bok[2]) or ((bok[2]*bok[2]+bok[1]*bok[1])==bok[0]*bok[0]) or ((bok[0]*bok[0]+bok[2]*bok[2])==bok[1]*bok[1])) { printf("PROSTOKATNY\n"); } else { printf("INNY TROJKAT\n"); } } } else { printf("NIE\n"); } } }
g++
9 -1 -1 -1 1 1 1 1 2 3 3 4 5 5 6 78 87 6 5 5 43 21 11 1 11 2 3 4
Show compiler warnings
[
+
] Compiler args
[
-
]
Show input
Compilation time: 0.54 sec, absolute running time: 0.1 sec, cpu time: 0.02 sec, memory peak: 3 Mb, absolute service time: 0,64 sec
edit mode
|
history
|
discussion
NIE ROWNOBOCZNY NIE PROSTOKATNY NIE NIE NIE ROWNORAMIENNY INNY TROJKAT