foundationda 5 - dars
Rivojiddin
Posted on August 14, 2024
bu cod 5 honali sonni yaxlitlab beradi masalan input; 13900,
yozilsa 14000 chiqazadi.
int main (){
int son ;
cin >> son;
float newSon = son;
cout << round(newSon / 1000) * 1000;
return 0;
}
bu cod biror sonni necha soat , necha minut , necha soniya ekanligini chiqazib beradi.
int main (){
int seconds;
cin >> seconds;
cout << setw(2) << setfill ('0') << seconds / 3600 << ":";
cout << setw(2) << setfill ('0') << seconds % 3600 / 60 << ":";
cout << setw(2) << setfill ('0') << seconds % 60 << ":";
return 0;
}
💖 💪 🙅 🚩
Rivojiddin
Posted on August 14, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
githubcopilot AI Innovations at Microsoft Ignite 2024 What You Need to Know (Part 2)
November 29, 2024