This content originally appeared on DEV Community and was authored by Rivojiddin
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;
}
This content originally appeared on DEV Community and was authored by Rivojiddin
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.
APA
MLA
Rivojiddin | Sciencx (2024-08-14T17:12:57+00:00) foundationda 5 – dars. Retrieved from https://www.scien.cx/2024/08/14/foundationda-5-dars/
" » foundationda 5 – dars." Rivojiddin | Sciencx - Wednesday August 14, 2024, https://www.scien.cx/2024/08/14/foundationda-5-dars/
HARVARDRivojiddin | Sciencx Wednesday August 14, 2024 » foundationda 5 – dars., viewed ,<https://www.scien.cx/2024/08/14/foundationda-5-dars/>
VANCOUVERRivojiddin | Sciencx - » foundationda 5 – dars. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/14/foundationda-5-dars/
CHICAGO" » foundationda 5 – dars." Rivojiddin | Sciencx - Accessed . https://www.scien.cx/2024/08/14/foundationda-5-dars/
IEEE" » foundationda 5 – dars." Rivojiddin | Sciencx [Online]. Available: https://www.scien.cx/2024/08/14/foundationda-5-dars/. [Accessed: ]
rf:citation » foundationda 5 – dars | Rivojiddin | Sciencx | https://www.scien.cx/2024/08/14/foundationda-5-dars/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.