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.

uses crt;

var st:string;

i,t,x,y:integer;

begin

clrscr;

readln(st);

writeln(length(st));

t:=0;

for i:=1 to length(st) do 

begin

val(st[i],x,y);

t:=t+x;

end;

writeln(t);

readln;

end.

1 tháng 8 2022

đẩy tương tác cho câu này đi ae ơi

 

1 tháng 8 2022

hổng bt lm :((

1 tháng 8 2022

uses crt;

var s:string; st:char;

begin

clrscr;

readln(s);

readln(st);

if pos(st,s) <> 0 then write('yes') else

write('no'); 

end.

29 tháng 7 2022

Program shh;

Uses crt;

Var n,t,i:integer;

Begin

      clrscr;

      write('n='); readln(n);

      t:=0;

for i:=1 to n-1 do

if n mod i=0 then t:=t+i;

if t=n then writeln(n,' la so hoan hao')

else writeln(n,' khong la so hoan hao');

readln;

End.

1 tháng 8 2022

function shc(n:longint):boolean;

var i,s:longint;

begin

s := 0;

for i := 1 to n div 2 do

begin

if n mod i = 0 then s := s + i;

end;

if s = n then shc:=true else

shc:=false;

end;

uses crt;

var a,i:integer;

s:real;

begin

clrscr;

readln(a);

s:=0;

for i:=1 to a do s:=s+1/a;

writeln(s:0:0);

readln;

end.

28 tháng 7 2022

cảm ơn ạ

 

28 tháng 7 2022

tham khảo:

 include<stdio.h> 
#include<conio.h> 
int main () 

float a,b; 
printf("nhap so thu nhat: "); 
scanf("%f",&a); 
printf("\nnhap so thu hai: "); 
scanf("%f",&b); 
printf("\ntong: %.2f + %.2f = %.2f\n",a,b,a+b); 
printf("hieu: %.2f - %.2f = %.2f\n",a,b,a-b); 
printf("tich: %.2f * %.2f = %.2f\n",a,b,a*b); 
printf("thuong: %.2f : %.2f = %.2f\n",a,b,a/b); 
getch (); 
return 0; 
}

29 tháng 7 2022

program bai2.1;

uses ctr;

var a,b,tong,hieu,tich,thuong:real;

begin

clrscr;

readln(a,b);

if b<>0 then tong:=a+b;

                     hieu:=a-b;

                     tich:=a*b;

                     thuong:=a/b;

writeln(a:0:0);

readln

end.

 

uses crt;

var a:array[1..10]of real;

i,n:integer;

t:real;

begin

clrscr;

n:=4;

for i:=1 to n do readln(a[i]);

t:=t+a[1]+a[2]+a[3]*2+a[4]*3;

writeln(t/7:4:2);

readln;

end.