Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
prestupn7 rok
//clang 6.0.0 #include <stdio.h> int main(void) { int x; printf("Zadej rok:\n"); scanf("%d",&x); if( (x % 4) == 0 ) { if( (x % 100) == 0 ) { if( (x % 100) == 0 ) { if( (x % 400)==0) { printf("%d je prestupny rok\n",x); } else { printf("rok %d neni prestupny rok\n",x); } } else { printf("rok %d neni prestupny rok\n",x); } } else { printf("rok %d neni prestupny rok\n",x); } } else { printf("rok %d neni prestupny rok\n",x); } }
run
|
edit
|
history
|
help
0
cv2
cv3
Printf ejemplos varios
Bucles: Euclides
C99 doesn't allow initializers in if-conditions, so this does not compile.
pattern1
Herout (67) - 2+
ternary test c89
Herout (67) - 3
Día de la semana