#include <iostream>
#include <time.h>
using namespace std;
int main(){
setlocale(LC_ALL, "Russian");
int a, b, arr[25], s=0, k=0;
srand(time(0));
for (int i=0; i<25; ++i) {
arr[i]=rand()%71-20;
cout<<arr[i]<<" ";
}
cout<<endl<<"Введите a и b: ";
cin>>a>>b;
for (int i=0; i<25; ++i) if (arr[i]>=a && arr[i]<=b) {++k; s+=arr[i];}
cout<<"Кол-во: "<<k<<endl<<"Сумма: "<<s;
return 0;
}
Что-то вроде этого:
Select * from readers (условное название таблицы читателей) where reader_id not in (select reader_id from books (условное название таблицы книг) where year(date_taken)=year(date())-1) (см. руководство по синтаксису и функциям применительно к конкретной версии SQL).
<span>#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <iterator>
using namespace std;
int main()
{
vector<string> str;
string text;
ifstream fin("a.txt");
while (getline(fin, text)) {
str.push_back(text);
}
fin.close();
str.erase(str.begin() + 2);
ofstream fout("b.txt");
copy(str.begin(), str.end(), ostream_iterator<string>(fout, <span>"\n"</span>));
fout.close();
system("pause");
return 0;
<span>}</span></span>