Quick actions

cmd+k|ctrl+k

Navigation

Languages

LAB5_321

Snippet info

Language

Cpp

Visibility

public

Author

maloy-

Created

2018-12-10T18:38:17Z

Updated

2018-12-10T18:38:17Z

#include <iostream>
using namespace std;

int main() {
    
    int n , k = 0  ; 
    cout << "Введите n" << endl ; 
    cin >> n ; 
    for ( size_t i = 1 ; i <= n ; i++){
        for(size_t i1 = 1; i1<=i;i1++){
            if ((i % i1) == 0){
                k++;
            } 
            
        }
        
        cout << i << "   " ;
            for (size_t j = 1 ; j <= k; j++){
                cout << "+";
            }
        cout << endl ; 
        k=0;
    }
    
    
    
    
    return 0;
}
INFO