Quick actions

cmd+k|ctrl+k

Navigation

Languages

Lab 7(3)

Snippet info

Language

Cpp

Visibility

public

Author

diety

Created

2018-12-21T05:32:57Z

Updated

2018-12-21T05:32:57Z

#include <iostream>
using namespace std;

int main() {
    int a[4][4] , sum ;
    for ( int i = 0 ; i <= 3 ; i++){
        for ( int j = 0 ; j <=3; j++){
            a[i][j] = rand () % 100 ;
            cout << a[i][j] << "   " ; 
            sum += a[i][j] ;
        }
        cout << endl << endl ;
        
    }
    
    if (( sum >999) && ( sum <=9999)){
            cout << " Сумма четырёхзначное число" << endl ;    
        }
        else {
            cout << " Сумма НЕ четырёхзначное число" << endl ;
        }
    
    
    return 0;
}
INFO