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.

21 tháng 10 2021

\(\text{110101011}_2=427_{10}=1AB_{16}\)

\(\text{101101101}_2=365_{10}=16D_{16}\)

\(\text{1101100001}_2=865_{10}=361_{16}\)

12 tháng 5 2021

01001001 01101101 00100000 01110010 01101111 01110110 01100101 01110010 00100000 01100111 01110101 01111001 00101110 01001001 01101101 00100000 01101110 01101111 01110100 00100000 01110011 01110100 01100001 01111001 00100000 01101000 01100101 01110010 01100101 00100000 01101100 01101111 01101110 01100111 01100101 01110010

13 tháng 7 2021
Code:#include <stdio.h> struct phanso {int tu;int mau;}; int ucln(int a, int b) {while(a!=b){if(a>b)a=a-b;elseb=b-a;}return a;} struct phanso tg(struct phanso a) {int c = ucln(a.tu, a.mau);a.tu /= c;a.mau /= c;return a;} struct phanso tong(struct phanso a, struct phanso b) {struct phanso s;s.tu = (a.tu * b.mau) + (b.tu * a.mau);s.mau = a.mau * b.mau;return s;} main() {struct phanso ps[100];struct phanso s;int n, x = 0, maxnum;double gtps[100], max;unsigned int i;printf("Nhap n: "); scanf("%d", &n);for (i = 0; i < n; i++) {printf("Nhap tu so cua phan so so %d: ", i + 1); scanf("%d", &ps[i].tu);printf("Nhap mau so cua phan so so %d: ", i + 1); scanf("%d", &ps[i].mau);}s = ps[0];for (i = 1; i < n; i++) {s = tong(s, ps[i]);}printf("\n");printf("a) Tong: %d/%d\n", tg(s).tu, tg(s).mau);for (i = 0; i < n; i++) {if (ps[i].mau != tg(ps[i]).mau) {x += 1;}}printf("b) So phan so chua toi gian: %d\n", x);for (i = 0; i < n; i++) {gtps[i] = (double)ps[i].tu / (double)ps[i].mau;}max = gtps[0];for (i = 1; i < n; i++) {if (max < gtps[i]) {maxnum = i;max = gtps[i];}}printf("c) Phan so co gia tri lon nhat la: %d/%d", ps[maxnum].tu, ps[maxnum].mau);return 0;} Ảnh:
D
datcoder
CTVVIP
10 tháng 10 2023

Bài 6:

#include <bits/stdc++.h>

using namespace std;

int main () {

int n;

cin >> n;

int p=n/60;

int s=n%60;

if (p<60) {

if (p<10) {

if (s<10) cout <<"00:0" << p << ":0" << s; else cout <<"00:0" << p << ":" << s;} else

if ((p>=10) and (p<60)) {if (s<10) cout << "00:" << p << ":0" << s;

else cout << "00:" << p << ":" << s;}}

if (p>=60) {

int h = p/60;

p = p%60;

if (h<10) { if (p<10) {

if (s<10) cout << "0" << h << ":" << "0" << p <<":0" <<s;

else cout << "0" << h << ":" << "0" << p <<":" <<s; } else {

if (s<10) cout << "0" << h << ":" << p <<":0" <<s;

else cout << "0" << h << ":" << p <<":" <<s;} } else {

if (p<10) { if (s<10) cout << h << ":" << "0" << p <<":0" <<s;

else cout << h << ":" << "0" << p <<":" <<s; } else {

if (s<10) cout << h << ":" << p <<":0" <<s;

else cout << h << ":" << p <<":" <<s;} } }

return 0;

}

D
datcoder
CTVVIP
11 tháng 10 2023

Bài 5:

#include <bits/stdc++.h>

using namespace std;

int main () {

int n;

cin >> n;

int m=n;

int t100 = n/100;

n = n - t100 * 100;

int t50 = n/50;

n = n - t50*50;

int t20 = n/20;

n = n - t20*20;

int t10 = n/10;

n = n - t10*10;

int t5 = n/5;

n = n - t5*5;

int t2 = n/2;

n = n - t2*2;

int t1 = n;

if (m>=100) cout << t100 << " to menh gia 100" << endl;

if (t50!=0) cout << t50<< " to menh gia 50" << endl;

if (t20!=0) cout << t20<< " to menh gia 20" << endl;

if (t10!=0) cout << t10<< " to menh gia 10" << endl;

if (t5!=0) cout << t5<< " to menh gia 5" << endl;

if (t2!=0) cout << t2<< " to menh gia 2" << endl;

if (t1!=0) cout << t50<< " to menh gia 1" << endl;

return 0;

}

D
datcoder
CTVVIP
26 tháng 3

#include <stdio.h>

int main(){

    int n;

    scanf("%d",&n);

    long t=0; int i,j;

    for (i=2; i<=n; i++){

        int c=0;

        for (j=2; j<i; j++)

            if (i%j==0) c++;

        if (c==0) t=t+i;

        }

printf("%d",t);

return 0;

}

D
datcoder
CTVVIP
9 tháng 1

Bạn trình bày lại đề bài rõ hơn nha, đề đọc rất khó hiểu ấy.

#include <bits/stdc++.h>

using namespace std;

int n,i,t1=0,t2=0;

int main()

{

cin>>n;

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

{

if (i%2==0) t1+=i;

else t2+=i;

}

cout<<t1<<endl;

cout<<t2<<endl;

cout<<"hieu tuyet doi la:"<<abs(t2-t1);

}