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 a,t:integer;
begin
clrscr;
t=0;
repeat
readln(a);
if (a>0) then t:=t+a;
until (a mod 2=0);
writeln(t);
readln;
end.
Uses crt;
Var tong,n:real;
Begin
clrscr;
tong:=0;
While tong<=200 do
Begin
readln(n);
tong:=tong+n;
End;
Writeln('Tong: ',tong:0:4);
readln;
End.
*Cách khác:
uses crt;
var x,t:real;
begin
clrscr;
t:=0;
repeat
write('Nhap x='); readln(x);
t:=t+x;
until t>200;
writeln(t);
readln;
end.
uses crt;
var n,t1:integer;
s:real;
begin
clrscr;
t1:=0;
s:=1;
repeat
readln\(\left(n\right)\);
if n mod 2=0 then t1:=t1+n
else s:=s*n;
until n=0;
writeln\(\left(t1\right)\);
writeln\(\left(s:4:2\right)\);
readln;
end.
uses crt;
var a,t:integer;
begin
clrscr;
t:=0;
repeat
readln(a);
if (a mod 2<>0) then t:=t+a;
until a=0;
writeln(t);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
int main ()
{
int a[32];
int n,i,s;
cout<<"nhap so phan tu cua mang ";
cin>>n;
cout<<"nhap cac phan tu cua mang ";
for (i=1; i<=n; i++)
{
s=0;
cin>>a[i];
}
for(i=1; i<=a[i]; i++) s=s+i;
cout<<s;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a,b,t;
int main()
{
cin>>a>>b>>t;
if (t==a+b) cout<<"chuc mung ban da tinh dung";
else cout<<"rat tiec ban da lam sai";
return 0;
}
uses crt;
var a,t:integer;
begin
clrscr;
t:=0;
repeat
write('Nhap a='); readln(a);
t:=t+a;
until a=0;
writeln(t);
readln;
end.