Ushbu kodda 5ta xonali sondan 3xonasini olishni o'rganamiz.
#include<iostream>
#include<iomanip>usingnamespacestd;intmain(){intson;cin>>son;cout<<son/100%10;// 12345 dan 3ni yani 3-chi sini olishni o'rganamizreturn0;}
Ushbu kodda sondan keyin ! belgisi chiqarish o'rganamiz.
#include<iostream>
#include<iomanip>usingnamespacestd;intmain(){intson;cin>>son;cout<<son/10000<<'!';cout<<son/1000%10<<'!';cout<<son/100%10<<'!';cout<<son/10%10<<'!';cout<<son/1%10;// ushbu kodda sondan keyin ! belgi chiqarish o'rganamiz.return0;}
Ushbu kodda bolub /, va foiz %, javobi chiqarishni o'rganamiz.
Top comments (0)