K
Khách

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.

6 tháng 3 2021

ai làm giúp mình

 

25 tháng 5 2021

Program HOC24;

var a: array[1..32000] of string;

d,i,n: integer;

begin

write('Nhap N: '); readln(n);

for i:=1 to n do

begin

 write('a[',i,']='); readln(a[i]);

end;

d:=0;

for i:=1 to n do

if length(a[i]) = 3 then d:=d+1;

write('Co ',d,' so co 3 chu so trong day');

readln

end.

#include <bits/stdc++.h>

using namespace std;

long long s,i,n;

int main()

{

cin>>n;

s=0;

for (i=1; i<=n; i++)

if (i%2==1) s=s+i*i;

cout<<s;

return 0;

}

16 tháng 1 2022

bn vt thành free pascal đc ko

 

3 tháng 8 2023

Dùng C++ nhé

 

GH
3 tháng 8 2023

B1:

#include <bits/stdc++.h>
using namespace std;
int main() {
    long long n;
    cout << "Nhap so n: ";
    cin >> n;
    cout << int(sqrt(n));
}

B2:

#include <bits/stdc++.h>
using namespace std;
int main() {
    float a,b;
    cout << "Nhap vao 2 so phan biet: ";
    cin >> a >> b;
    if (a>b) cout << a;
    else cout << b;
}

19 tháng 11 2021

bạn hỏi khó thế, đây mới là phần cho lớp 8 thôi mà

#include <bits/stdc++.h>

using namespace std;

long long a[1000],n,i,dem1,dem2;

int main()

{

cin>>n;

for (i=1; i<=n; i++) cin>>a[i];

for (i=1; i<=n; i++) cout<<a[i]<<" ";

cout<<endl;

dem1=0;

dem2=0;

for (i=1; i<=n; i++)

{

if (a[i]%2==0) dem1++;

else dem2++;

}

cout<<dem1<<" "<<dem2;

return 0;

}

7 tháng 5 2023

program Le_Nho_Hon_Hoac_Bang_n;

uses crt;

var

       n, i: integer;

begin

       clrscr;

       write('Nhap vao mot so nguyen duong n: ');

       readln(n);

       while n <= 0 do

       begin

              writeln('So ban nhap khong hop le. Xin vui long nhap lai: ');

              readln(n);

       end;

       clrscr;

       writeln('Cac so le nho hon hoac bang ', n, ' la:');

       i := 1;

       while i <= n do

       begin

              if i mod 2 <> 0 then

                     writeln(i);

              i := i + 1;

       end;

       readln;

end.