Quick actions

cmd+k|ctrl+k

Navigation

Languages

LAB5_367

Snippet info

Language

Cpp

Visibility

public

Author

maloy-

Created

2018-12-05T18:44:34Z

Updated

2018-12-05T18:44:34Z

#include <iostream>
using namespace std;

int main() {
    int d ; 
    cout << "Введите D" << endl ; 
    cin >> d ;
    int k = 0 , a[d+100] ;
    for (size_t i=2 ; i<=d;i+=5){
        a[k]=i;
        
        k++;
    }
    cout << "Прогрессия" << endl ; 
    for ( size_t i = 0 ; i< k ; i++){
        cout << i+1<< " - " << a[i] << endl ; 
    }
    
    cout << endl << (a[k-1] + 5 ) << " - первый член привышающий d и его номер =  " << k+1;
    
    
    
    return 0;
}
INFO