Answer:
The program in C++ is as follows:
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
string filename;
cout<<"Filename: ";
cin>>filename;
ifstream inFile(filename);
if(!inFile) {
cout << endl << "Cannot open file " << filename;
return 1; }
ofstream fout;
ifstream fin;
fin.open("invalid-numbers.txt");
fout.open ("invalid-numbers.txt",ios::app);
double sum = 0; int valid = 0; int invalid = 0;
double num = 0;
while(!inFile.eof()) {
inFile >> num;
if(num >= 0 && num<=110){ sum+=num; valid++; }
else{ invalid++;
if(fin.is_open()){
fout<<fixed<<setprecision(2)<<num<<"\n"; } } }
fin.close();
fout.close();
inFile.close();
cout<<"Total values: "<<valid+invalid<<endl;
cout<<"Invalid values: "<<invalid<<endl;
cout<<"Valid values: "<<valid<<endl;
cout<<"Average of valid values: "<<fixed<<setprecision(2)<<sum/valid<<endl;
double inv;
ifstream inFiles("invalid-numbers.txt");
while(!inFiles.eof()) {
inFiles >> inv;
cout<<inv<<"\n";
}
inFiles.close();
return 0;
}
Explanation:
See attachment for source file where comments are used to explain each line
Hey there!
I believe your answer will be the "Shift" key. You can hold down Shift and select a cell from your current cell position to select everything between the original position and the cell you clicked on without having to drag your mouse across the cells. If you were to hold down the Ctrl or Command key, you would only have your original selection and your new selection highlighted.
Your answer will be Shift.
Hope this helped you out! :-)
An area of improvement that can be achieved using AI and Machine in the Future of Transport are given below:
The technical issues of artificial intelligence are
- Artificial Neural Networks.
- Deep Learning.
- Natural language processing.
The potential issues that can arise from the adoption of AI technology
is hacking of transport system and system fail and how it can be overcome is by aiding system with enough security as well as regular maintenance.
<h3>What is the Future of Transport about?</h3>
AI is known to be one that has the power as well as the potential to be able to make traffic in regards to movement of vehicles to be very more efficient.
Note that it is one that can ease traffic congestion and also gives driver's a lot of time, also make parking easier as well as encourage car or ridesharing.
Note that as AI aids or function to keep road traffic to be flowing, it can also lower the fuel consumption rate that is as a result of the use of vehicles idling if stationary,
Learn more about AI from
brainly.com/question/25523571
#SPJ1
Answer:
True
Explanation:
hope this helps if not sorry :(