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.

19 tháng 12 2021

#include <bits/stdc++.h>

using namespace std;

long long a,b,c,t;

int main()

{

cin>>a>>b>>c;

t=0;

if (a%2!=0) t=t+a;

if (b%2!=0) t=t+b;

if (c%2!=0) t=t+c;

cout<<t;

return 0;

}

20 tháng 12 2021

#include <bits/stdc++.h>

using namespace std;

long long a,b,c,t;

int main()

{

cin>>a>>b>>c;

t=0;

if (a%2!=0) t=t+a;

if (b%2!=0) t=t+b;

if (c%2!=0) t=t+c;

cout<<t;

return 0;

}

27 tháng 12 2022

uses crt;

var a,b,c,max:integer;

begin

clrscr;

write('nhap ba so:');readln(a,b,c);

if a mod 2=0 then writeln(a,' la so chan')

else writeln(a,'la so le);

if b mod 2=0 then writeln(b,'la so chan')

else writeln(b,'la so le');

if c mod 2=0 then writeln(c,'la so chan')

else writeln(c,'la so le');

max:=a;

if max<b then max:=b;

if max<c then max:=c;

writeln('so lon nhat trong ba so la:',max);

readln

end.

 

 

19 tháng 3 2023

Câu 1:

Program HOC24;

var i,p: integer;

t: longint;

begin

write('Nhap P: '); readln(p);

t:=0;

for i:=1 to p do if i mod 2<>0 then t:=t+i;

write('Tong cac so le la: ',t);

readln

end.

19 tháng 3 2023

Câu 2:

Program HOC24;

var i,n: integer;

t: longint;

begin

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

t:=0;

for i:=1 to n do if i mod 2=0 then t:=t+i;

write('Tong cac so chan la: ',t);

readln

end.

14 tháng 3 2023

15 tháng 3 2023

program TongUoc;

uses crt;

var
  N, i, Tong: integer;

begin
  clrscr;
  Tong := 0;
  write('Nhap so tu nhien N: ');
  readln(N);

  // Tinh tong cac uoc cua N
  for i := 1 to N do
  begin
    if N mod i = 0 then
    begin
      Tong := Tong + i;
    end;
  end;

  writeln('Tong cac uoc cua ', N, ' la: ', Tong);

  readln;
end.

29 tháng 7 2023

đitf

7 tháng 6 2021

uses crt;
var a:array[1..1000000] of longint;
      n,i,s:longint;
begin
      clrscr;
      write('Nhap so luong phan tu: '); readln(n);
      for i:=1 to n do 
            begin
                  write('Nhap phan tu thu ',i,': '); readln(a[i]);
                  if a[i] mod 2=1 then inc(s,a[i]);
            end;
      write('Tong cac so le: ',s);
      readln;
end.

17 tháng 5 2022

test test