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.
USES crt;
VAR i,n:integer;
BEGIN
clrscr;
write('Nhap n:');readln(n);
i:=1;
while i<=10 do
begin
writeln(n,' X ',i,'=',n*i);
inc(i);
end;
readln;
END.
program bang_nhan;
uses crt;
var i,N : integer;
begin clrscr;
write('Nhap so N='); readln(N);
writeln('Bang nhan' , N , 'la :');
for i:= 1 to 10 do writeln(N , 'x' , i ,'=' , N * i );
readln;
end.
C2: Program Cau_2;
Var
A,x:integer;
Begin
clrscr;
writeln('Hay nhap so x:');
readln(x);
A:=0;
A:=x*(2+x)-x;
writeln('Bieu thuc A bang:',A:10:5);
Readln;
end.
Bài 1
Var a:array:[1..99] of integer;
i,n:integer;
s:longint;
Begin
Repeat
Write('n = ');readln(n);
Until (n > 0) and (n < 100);
For i:=1 to n do
Begin
Write('Nhap diem thu ',i,' = ');readln(a[i]);
if a[i] mod 2 = 0 then s:=s+a[i];
End;
Write('Cac so vua nhap la: ');
For i:=1 to n do
Write(a[i]:8);
writeln;
write('Tong cac so chan la ',s);
Readln
End.
Bài 2
Var a:array:[1..99] of integer;
i,n:integer;
s:longint;
Begin
Repeat
Write('n = ');readln(n);
Until (n > 0) and (n < 100);
For i:=1 to n do
Begin
Write('Nhap diem thu ',i,' = ');readln(a[i]);
if a[i] mod 2 <> 0 then s:=s+a[i];
End;
Write('Cac so vua nhap la: ');
For i:=1 to n do
Write(a[i]:8);
writeln;
write('Tong cac so le la ',s);
Readln
End.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=(a+b)*2+c;
if (tb>=38) cout<<"Chuc man ban da thi dau tuyen sinh";
else cout<<"Ban da thi rot, chuc may man lan sau";
return 0;
}
1:
uses crt;
var t,x,i,n:integer;
begin
clrscr;
t:=0;
n:=10;
for i:=1 to n do
begin
readln(x);
t:=t+x;
end;
write(t);
readln;
end.
2:
uses crt;
var dem,x,i,n:integer;
begin
clrscr;
dem:=0;
n:=10;
for i:=1 to n do
begin
readln(x);
if x mod 2=0 then inc(dem);
end;
write(dem);
readln;
end.
3
program Cacsole;
uses crt;
var M, N, i: integer;
begin
clrscr;
write ('Nhap M= '); readln(M);
write ('Nhap N= '); readln(N);
for i := M to N do
if i mod 2 = 1 then
write (i,' ');
readln;
end.
1)
var n: integer ;
write('nhap gia tri n'); readln(n);
for 1 to n do
if i mod 2 =1 then write(i:3);
readln
end.
Bài 1:
uses crt;
var n,i,t1,t2:integer;
begin
clrscr;
write('Nhap n='); readln(n);
t1:=0;
for i:=1 to n do
t1:=t1+i*(i+1)*(i+2);
t2:=0;
for i:=1 to n do
begin
if i mod 2<>0 then t2:=t2+i*(i+1)*(i+2)
else t2:=t2-i*(i+1)*(i+2);
end;
writeln('T1=',t1);
writeln('T2=',t2);
readln;
end.
Bài 2:
uses crt;
var i,dem,n:integer;
begin
clrscr;
write('Nhap n='); readln(n);
dem:=0;
writeln('Cac uoc cua mot so ',n,' la: ');
for i:=1 to n do
if n mod i=0 then
begin
write(i:4);
dem:=dem+1;
end;
writeln;
writeln('So luong uoc cua ',n,' la: ',dem);
readln;
end.
var i,k:integer;
begin
k:=2;
for i:=1 to 10 do writeln(k,' x ',i,k*i);
readln;
end.
Var i ,a : byte;
Begin;
i:=2;
For a:=1 to 10 do Writeln ( i, 'x',a,'=',i*a);
Readln;
End.