#include <stdio.h> #include <stdlib.h> #include <locale.h> int main() { setlocale(LC_ALL, "Russian"); int n = 1; double l; printf("ΠΠ²Π΅Π΄ΠΈΡΠ΅ Π΄Π»ΠΈΠ½Ρ ΠΎΡΡΠ΅Π·ΠΊΠ°: "); scanf("%d", &l); do { printf("ΠΠ²Π΅Π΄ΠΈΡΠ΅ Π΅Π΄ΠΈΠ½ΠΈΡΡ ΠΈΠ·ΠΌΠ΅ΡΠ΅Π½ΠΈΡ Π΄Π»ΠΈΠ½Ρ, Π³Π΄Π΅ \n1 - Π΄Π΅ΡΠΈΠΌΠ΅ΡΡ,\n2 - ΠΊΠΈΠ»ΠΎΠΌΠ΅ΡΡ,\n3 - ΠΌΠ΅ΡΡ,\n4 - ΠΌΠΈΠ»Π»ΠΈΠΌΠ΅ΡΡ,\n5 - ΡΠ°Π½ΡΠΈΠΌΠ΅ΡΡ \n"); scanf("%d", &n); switch(n) { case 1: printf("ΠΠ»ΠΈΠ½Π° ΠΎΡΡΠ΅Π·ΠΊΠ° - %lf ΠΌΠ΅ΡΡΠΎΠ². \n", l/10.0); break; case 2: printf("ΠΠ»ΠΈΠ½Π° ΠΎΡΡΠ΅Π·ΠΊΠ° - %d ΠΌΠ΅ΡΡΠΎΠ². \n", l*10); break; case 3: printf("ΠΠ»ΠΈΠ½Π° ΠΎΡΡΠ΅Π·ΠΊΠ° - %d ΠΌΠ΅ΡΡΠΎΠ². \n", l); break; case 4: printf("ΠΠ»ΠΈΠ½Π° ΠΎΡΡΠ΅Π·ΠΊΠ° - %lf ΠΌΠ΅ΡΡΠΎΠ². \n", l/1000.0); break; case 5: printf("ΠΠ»ΠΈΠ½Π° ΠΎΡΡΠ΅Π·ΠΊΠ° - %lf ΠΌΠ΅ΡΡΠΎΠ². \n", l/100.0); break; default: printf("ΠΡΠΈΠ±ΠΊΠ°. ΠΠΎΠ²ΡΠΎΡΠΈΡΠ΅ Π²Π²ΠΎΠ΄. \n"); } } while (n>5 || n < 1); system("pause"); return 1; } Closed due to the fact that off-topic participants ίίί€ί , Kromster , Denis Bubnov , m9_psy , vp_arth 13 Apr '17 at 20:58 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reasons:
- "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - ίίί€ί, m9_psy, vp_arth
- βQuestions asking for help with debugging (β why does this code not work? β) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Kromster, Denis Bubnov
- 2Why don't you use the debugger? - VladD
- @VladD, but many people do not like to use it: D - nick
- @VladD do not know how to use it because I write in Dev C ++. - A. Leontiev
- And what, debug output already canceled? Or do you think that the first thing that was written for some ENIAK is a debugger? - Harry
- @Harry Thanks for the tip! I will have to use it in the future, since I make such ridiculous mistakes. - A. Leontiev
|