Answer:
/*C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program */
//header files
#include <fstream>
#include<string>
#include <iostream>
#include <cstdlib> //needed for exit function
using namespace std;
//function prototype
int fileSum(string filename);
int main()
{
string filename;
cout << "Enter the name of the input file: ";
cin >> filename;
cout << "Sum: " << fileSum(filename) << endl;
system("pause");
return 0;
}
/*The function fileSum that takes the string filename and
count the sum of the values and returns the sum of the values*/
int fileSum(string filename)
{
//Create a ifstream object
ifstream fin;
//Open a file
fin.open(filename);
//Initialize sum to zero
int sum=0;
//Check if file exist
if(!fin)
{
cout<<"File does not exist ."<<endl;
system("pause");
exit(1);
}
else
{
int value;
//read file until end of file exist
while(fin>>value)
{
sum+=value;
}
}
return sum;
}//end of the fileSum
Explanation:
This is a C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program.
Check attachment for sample output screenshot.
Answer:
all of these
Explanation:
As we know that, at the time of presentation we need to print copy of handouts for the audience of the presentation.
All three steps are necessary because.
A. There may be huge number of audience, so to save paper we place more than one slides per page
B. The flow of presentation must be same on handouts as on your presentation slides.
C. There should be a copy of handout for every person who is sitting in your presentation
Answer:
Explanation:
If it has not changed since the last time that i used codehs then the code should be the following
penup()
forward(-100)
right(90)
pendown()
def beaded_bracelet():
circle(10)
penup()
forward(20)
left(10)
pendown()
for i in range(36):
beaded_bracelet()
Which should complete the entire function as intended.
<span>Answer:
-Software architecture isn't about big design up front;
-Every software team needs to consider software architecture;
-The software architecture role is about coding, coaching and collaboration;
-You don't need to use UML;
-A good software architecture enables agility.</span>