Advertisement
Josif_tepe

Untitled

Mar 12th, 2024
919
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int broj;
  6.     cin >> broj;
  7.    
  8.     int treta_cifra = broj % 10;
  9.     int vtora_cifra = (broj / 10) % 10;
  10.     int prva_cifra = broj / 100;
  11.    
  12.     cout << "Na brojot " << broj << " prvata cifra e " << prva_cifra << ", vtorata cifra e " << vtora_cifra << ", tretate cifra e " << treta_cifra << endl;
  13.     return 0;
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement