Объяснение:
#include <iostream>
using namespace std;
int main(){
int document_count;
cin >> document_count;
if (document_count==1)
{
cout << "egual" << endl;
cout << " One document found" << endl;
}
else if (document_count==0)
cout << "not egual" << endl;
cout << "No documents found" << endl;
else
cout<<document_count<<" documents found";
return 0;
Поделитесь своими знаниями, ответьте на вопрос:
Отредактируйте код. Если на вход дан 0, пусть программа выводит No documents found, если 1 — One document found. Во всех остальных случаях программа должна, как и прежде, выводить documents found.
Объяснение:
#include <iostream>
using namespace std;
int main(){
int document_count;
cin >> document_count;
if (document_count==1)
{
cout << "egual" << endl;
cout << " One document found" << endl;
}
else if (document_count==0)
{
cout << "not egual" << endl;
cout << "No documents found" << endl;
}
else
cout<<document_count<<" documents found";
return 0;
}