Код на С:
int main(){
int a,b;
double x;
scanf("%d %d", &a, &b);
if (b==0) { printf("Div by zero!"); getch(); return 1;} else{
x=a/b; printf("x = %.2F", x); getch();}
return 0;
}
библиотеки не писал, нужны stdio и conio
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x;
cin >> n;
int i = 0;
while (i < n) {
cin >> x;
if (x == 0) {
cout << "YES" << endl;
return 0;
}
++i;
}
cout << "NO" << endl;
return 0;
}
Program Test;
var A, B, C, S, K: byte;
begin
ReadLn(A, B, C);
S := ((A * C) * 2) + ((B * C) * 2);
K := S div 8;
if (k mod 10) > 0 then
begin Inc(K);WriteLn('Потребуется купить ', K, ' банок краски');
end;
if (k mod 10) < 0 then WriteLn('Потребуется купить ', K, ' банок краски');
end.