Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
4: 2
2|0
1|0
0|1
4₁₀=100₂
10: 2
5|0
2|1
10₁₀=1010₂
1996: 2
998|0
499|0
249|1
124|1
62|0
31|0
15|1
7|1
3|1
1|1
1996₁₀=11111001100
100.1010.11111001100
#include < stdio.h> #include < stdlib.h> #include < conio.h> #include < math.h> int main(){ int x, y; printf("\n vvedite x and y: "); scanf("%d" "%d", & x, & y); if (x < y) printf("\n x = %d, y = %d", (x + y)/2, 2 * x * y); else printf("\n x = %d, y = %d", 2 * x * y, (x + y)/2); printf("\n\n to "); getch( ); return 0; }
файл, правка, вид, вставка, формат, сервис, таблица, окно, справка.
program ml; uses crt; var x,i: integer; w,l: real; beginclrscr; readln(x); l: =x; for i: =1 to x do beginw: =w+1; l: =x/w; if frac(l) = 0 then writeln(l: 2: 0); end; readkey; end.
Популярные вопросы