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.
#include <bits/stdc++.h>
using namespace std;
int p;
int main()
{
cin>>p;
cout<<p/60<<":"<<p%60;
}
uses crt;
var p,a,b:integer;
begin
clrscr;
readln(p)
a:=p div 60;
b:=p mod 60;
write(a,':',b);
readln;
end.
uses crt;
var st:string;
d,i,n:integer;
begin
clrscr;
readln(n);
str(n,st);
d:=length(st);
for i:=d downto 1 do
write(st[i]);
readln;
end.
tham khảo
Program Hotboy;
Uses crt;
Var A:array[1..100] of integer;
I,n : byte;
S:real;
Begin
Clrscr ;
S:=1;
Write('nhao so phan tu trong day'); readln(n);
For i:=1 to n do
Begin
Write('A[',i,']'); readln(A[i]);
End;
For i:=1 to n do
If A[i] mod 5 =0 then
S:=S* A[i] ;
Writeln('Tong cac phan tu chia het cho 5 trong mang la',S);
Readln
End.
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
readln(n);
t:=1;
for i:=1 to n do
if a[i] mod 2<>0 then t:=t*a[i];
writeln(t);
readln;
end.
#include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int temp = x;
x = y;
y = temp;
cout << "x=" << x << endl;
cout << "y=" << y << endl;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a[15],i,n=15,s,t;
int main()
{
for (i=1; i<=n; i++) cin>>a[i];
s=1;
for (i=1; i<=n; i++)
if (a[i]%2==0)
{
cout<<a[i]<<" ";
s*=a[i];
}
cout<<endl;
cout<<"Tich cac so chan la: "<<s<<endl;
t=0;
for (i=1; i<=n; i++)
if (a[i]<0) t=t+a[i]*a[i];
cout<<t;
return 0;
}
6:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,A[100],i,dem=0;
cin>>n;
for (int i=1; i<=n; i++) cin>>A[i];
for (int i=1;i<=n; i++)
if (A[i]%2!=0) dem++;
cout<<dem;
return 0;
}
5:
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,nn=1e6,A[1000];
cin>>n;
for (int i=1; i<=n; i++) cin>>A[i];
for (int i=1; i<=n; i++)
nn=min(nn,A[i]);
for (int i=1; i<=n; i++)
if (nn==A[i]) cout<<i<<" ";
return 0;
}
2:
#include <bits/stdc++.h>
using namespace std;
long long n,i;
int main()
{
cin>>n;
for (i=1; i<=n; i++)
if (n%i==0) cout<<i<<" ";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int p;
int main()
{
cin>>p;
int a=p/3600;
p=p-a*3600;
int b=p/60;
int c=p%60;
cout<<a<<":"<<b<<":"<<c;
}
#include <iostream>
using namespace std;
int main()
{
int t;
cin >> t;
int h = t / 3600;
int m = (t % 3600) / 60;
int s = (t % 3600) % 60;
cout << h << ":" << m << ":" << s << endl;
return 0;
}