Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
program TimSoLonNhat;
var
a, b, c, d, max: integer;
begin
write('Nhap a: '); readln(a);
write('Nhap b: '); readln(b);
write('Nhap c: '); readln(c);
write('Nhap d: '); readln(d);
max := a;
if b > max then
max := b;
if c > max then
max := c;
if d > max then
max := d;
writeln('So lon nhat la: ', max);
readln;
end.
program TimSoLonNhat;
var a, b, c, d: integer;
begin
writeln('Nhap vao gia tri cua a: ');
readln(a);
writeln('Nhap vao gia tri cua b: ');
readln(b);
writeln('Nhap vao gia tri cua c: ');
readln(c);
writeln('Nhap vao gia tri cua d: ');
readln(d);
if (a > b) and (a > c) and (a > d) then
writeln('So lon nhat la: ', a)
else if (b > a) and (b > c) and (b > d) then
writeln('So lon nhat la: ', b)
else if (c > a) and (c > b) and (c > d) then
writeln('So lon nhat la: ', c)
else
writeln('So lon nhat la: ', d);
readln;
end.
uses crt;
var n,i,t:integer;
begin
clrscr;
readln(n);
t:=0;
for i:=1 to n do
if i mod 2=1 then t:=t+i;
writeln(t);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long n,i,t;
int main()
{
cin>>n;
t=0;
for (i=1; i<=n; i++)
if (i%2==0) t+=i;
cout<<t;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long n,i,t;
int main()
{
cin>>n;
t=0;
for (i=1; i<=n; i++)
if (i%2!=0) t+=i;
cout<<t;
return 0;
}
program;
uses crt;
var a:longint;
begin
clrscr;
write('nhap a:');readln(a);
if(a>=0)and(a<=50)then write('n nam trong khoang tu 1 den 50')
else write('n khong nam trong khoang tu 1 den 50');
readln;
#include <bits/stdc++.h>
using namespace std;
int a;
int main()
{
cin>>a;
if ((a>=1) and (a<=50)) cout<<"YES";
else cout<<"NO";
return 0;
}
program TimSoLonNhat;
var a, b, c, d: integer;
begin
writeln('Nhap vao gia tri cua a: ');
readln(a);
writeln('Nhap vao gia tri cua b: ');
readln(b);
writeln('Nhap vao gia tri cua c: ');
readln(c);
writeln('Nhap vao gia tri cua d: ');
readln(d);
if (a > b) and (a > c) and (a > d) then
writeln('So lon nhat la: ', a)
else if (b > a) and (b > c) and (b > d) then
writeln('So lon nhat la: ', b)
else if (c > a) and (c > b) and (c > d) then
writeln('So lon nhat la: ', c)
else
writeln('So lon nhat la: ', d);
readln;
end.