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 im_14424;
uses crt;
var m: interger;
begin
clrscr;
write('Nhap vap so nguyen duong m: ');
readln(m);
if m>0 and m mod 2 = 0 then write('So nguyen duong m la so chan');
if m>0 and m mod 2 <> 0 then write('So nguyen duong m la so le);
if m<0 then write('m khum phai la so nguyen duong');
readln
end.
b)
uses crt;
var i,y:integer;
begin
clrscr;
y:=0;
for i:=1 to 100 do
y:=y+i;
writeln('y=',y);
readln;
end.
c)
uses crt;
var y,i:integer;
begin
clrscr;
y:=0;
i:=1;
while y<=3200 do
begin
y:=y+i;
inc(i);
end;
writeln('y=',y);
readln;
end.
Bài 1:
uses crt;
var n,t,i,d,x:integer;
st:string;
begin
clrscr;
readln(n);
str(n,st);
d:=length(st);
t:=0;
for i:=1 to d do
begin
val(st[i],x);
t:=t+x;
end;
writeln(t);
readln;
end.
uses crt;
const fi='baitap.txt';
var f1:text;
a,b,c,d:array[1..100]of real;
i,n:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(f1,a[n],b[n],c[n],d[n]);
end;
for i:=1 to n do
writeln(sqrt(sqr(a[i]-c[i])+sqr(b[i]-d[i])):4:3);
close(f1);
readln;
end.
2:
#include <bits/stdc++.h>
using namespace std;
double a;
int main()
{
cin>>a;
if (a<0) cout<<"a la so am";
else cout<<"a khong la so am";
return 0;
}