Home
О нас
Products
Services
Регистрация
Войти
Поиск
Procrastination
@Procrastination
August 2022
1
10
Report
пожалуйста, выручайте, нужно написать программу на С/С++
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
Answers & Comments
Andrey05
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int i,n;
cout<<"Vvedite n: ";
cin>>n;
int a[n];
for (i=0; i<n; i++){
cout<<"Vvedite "<<i+1<<"-e chislo massiva: ";
cin>>a[i];
}
int d=a[1]-a[0];
i=1;
int f=0;
while (i<n-1 && f==0)
{ if (a[i+1]!=(a[i]+d)) f=1; i++; }
if (f==0) cout<<"Proggressia\n"; else cout<<"Ne progressia\n";
cin>>n; //чтобы окно не закрывалось
return 0;
}
0 votes
Thanks 0
×
Report "С++..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
О нас
Политика конфиденциальности
Правила и условия
Copyright
Контакты
Helpful Social
Get monthly updates
Submit
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <cstdlib>
using namespace std;
int main() {
int i,n;
cout<<"Vvedite n: ";
cin>>n;
int a[n];
for (i=0; i<n; i++){
cout<<"Vvedite "<<i+1<<"-e chislo massiva: ";
cin>>a[i];
}
int d=a[1]-a[0];
i=1;
int f=0;
while (i<n-1 && f==0)
{ if (a[i+1]!=(a[i]+d)) f=1; i++; }
if (f==0) cout<<"Proggressia\n"; else cout<<"Ne progressia\n";
cin>>n; //чтобы окно не закрывалось
return 0;
}