Facebook
From lol, 5 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 129
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.    
  6.     int numar;
  7.     printf("Introduceti un numar mai mare decat 1: ");
  8.     scanf_s(numar);
  9.  
  10.    
  11.     if (numar <= 1) {
  12.         printf("Numarul introdus trebuie sa fie mai mare decat 1. \n");
  13.         return 1;
  14.     }
  15.  
  16.        int coloana = (numar - 2) / 4 + 1;
  17.  
  18.        printf("Coloana %s", coloana);
  19.  
  20.  
  21. }
  22.