Ответы
Ответ дал:
0
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
int N;
int array[100];
ifstream file1 ("input.txt");
ofstream file2 ("output.txt");
file1 >> N;
for(int i = 0;i < N;i++) {
file1 >> array[i];
if(i % 2 == 0)
file2 << array[i] << " ";
}
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int N;
int array[100];
ifstream file1 ("input.txt");
ofstream file2 ("output.txt");
file1 >> N;
for(int i = 0;i < N;i++) {
file1 >> array[i];
if(i % 2 == 0)
file2 << array[i] << " ";
}
return 0;
}
Ответ дал:
0
#include <fstream>
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
int array[10];
ifstream cin("input.txt");
ofstream cout("output.txt");
cin >> N;
for(int i = 0;i < N;i++) {
cin >> array[i];
if(i % 2 == 0)
cout << array[i] << " ";
}
return 0;
}
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
int array[10];
ifstream cin("input.txt");
ofstream cout("output.txt");
cin >> N;
for(int i = 0;i < N;i++) {
cin >> array[i];
if(i % 2 == 0)
cout << array[i] << " ";
}
return 0;
}
Ответ дал:
0
В этом решении нужно что-то доработать , в программе оно не работает
Ответ дал:
0
Сейчас исправлю
Ответ дал:
0
работает?
Вас заинтересует
2 года назад
2 года назад
2 года назад
8 лет назад
8 лет назад
9 лет назад