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;
}
Top comments (1)
zo'r