

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
#include <stdio.h>
int main() {
int currentSeconds = 1000000000; // = 1 billion seconds
int years = currentSeconds / 31536000;
currentSeconds -= 31536000 * years;
int months = currentSeconds / 2592000;
currentSeconds -= 2592000 * months;
int days = currentSeconds / 86400;
currentSeconds -= 86400 * days;
int hours = currentSeconds / 3600;
currentSeconds -= 3600 * hours;
int minutes = currentSeconds / 60;
currentSeconds -= 60 * minutes;
int seconds = currentSeconds;
printf("%d nam, %d thang, %d ngay, %d gio, %d phut, %d giay", years, months, days, hours, minutes, seconds);
}
Hãy giúp mọi người biết câu trả lời này thế nào?
![]()
Bảng tin
2289
45112
1742
Thế đổi ra như nào bạn nhỉ
7681
147336
6887
ý mình hỏi là kiểu 1 tỷ giây gồm bao nhiêu năm, tháng, ngày, phút, giây, giờ trong đó á
2289
45112
1742
À ok bạn
2289
45112
1742
Mình sửa rồi đấy bạn.
5599
4872
3499
mod ơi nhập 2 số trên 1 dòng lm sao ạ ( trong py ạ )
2289
45112
1742
Hình như là n, m = map(int, input().split())
5599
4872
3499
Dạ, em c.ơn anh ạ
5599
4872
3499
Anh ơi em hỏi tí ạ Code này em sai chổ nào ạ a,b = map(int, input().split(' ')) c=[100] ; s=0 c[1] = 4 c[2] = 4.5 c[3] = 5 c[4] = 2 c[5] = 1.5 for i in range(max(a,b)) : if a == c[i] : s+= c[i] if b == c[i] : s+=c[i] print(s) Rút gọnAnh ơi em hỏi tí ạ Code này em sai chổ nào ạ a,b = map(int, input().split(' ')) c=[100] ; s=0 c[1] = 4 c[2] = 4.5 c[3] = 5 c[4] = 2 c[5] = 1.5 for i in range(max(a,b)) : if a == c[i] : s+= c[i] if b == c[i] : s+=c[i] print(... xem thêm