1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nadusha1986 [10]
3 years ago
10

Write a simple compilable program that outputs to an Excel-compatible XLS file these two rows: (1) a header row with headings fo

r each column and (2) a data row with one set of data. You may have addition data rows if you wish.
Include at least 3 columns of information of any kind you like, with real or made-up data. For example, a student record, a stock quote, a weather forecast, etc.
Hint: use the character \t for column breaks and \n for row breaks.
Computers and Technology
1 answer:
ollegr [7]3 years ago
5 0

Answer:

#include <iostream>

#include <fstream>

using namespace std;

struct student

{

string name;

int id;

double average;

};

int main()

{

string filename = "data.csv";

student s[3] = { {"Peter", 101, 65.4},

{"Mary", 102, 60.4},

{"Jed", 103, 55.4}};

ofstream outFile(filename.c_str());

outFile << "Name,ID,Average" << endl;

for(int i = 0; i < 3; i++)

{

outFile << s[i].name << "," << s[i].id << "," << s[i].average << endl;

}

outFile.close();

cout << "Please open " << filename << " in Excel" << endl;

}

Explanation:

Name ID Average

Peter 101 65.4

Mary 102 60.4

Jed 103 55.4

You might be interested in
What classes should I take in high-school for majoring in computer science?
Gala2k [10]

Answer:

Computer science are the disciplines that study information, computing and the applications or ecosystems where they are developed. It is a science that comes from applied mathematics and has 3 branches that are quite well known. On the one hand we have software engineering, secondly theory as such (primary study of algorithms and data, etc.) and finally the application of the amalgam of the first two, which end up resulting in disciplines such as big data, cybersecurity or computer security, machine learning, artificial intelligence, etc. However, we are talking about a very broad science with various branches of work. Technological advances that have improved the scope of education, now allow us to develop in specific skills and computer science is one of the macro careers that have benefited the most thanks to the diversity of subjects it encompasses. This is where the on-demand courses available on the edX platform come in. Computer scientists are in one of the best times for their career advancement. We invite you to be part of the technological development and information and computing technologies through online courses.

Explanation:

6 0
3 years ago
How many generations of computers languages have there been since the middle of the 20th century
Molodets [167]
<span>There are 4 computer language generations. First is the first generation language or 1GL, second is the second-generation languages or the 2GL, next is the third-generation languages or the 3GL, and the last is fourth-generation languages or the 4GL.</span>
4 0
3 years ago
Read 2 more answers
What careers are most likely to require business skills
olchik [2.2K]

i would say maybe an accountant, entrepreneur, business reporter, or something like that.

8 0
3 years ago
Which function can you use to capture the contents of an open window?
zloy xaker [14]

Answer:

To capture the contents of the currently active window, press Alt-PrtScrn (or Alt-Print Screen ). To capture the contents of the entire screen, press PrtScrn (or Print Screen ) by itself.

hope it helps you

make me brainliest plz

8 0
2 years ago
Which type of computer serves as the heart of the computing systems for many, perhaps most, major corporations and government ag
Nezavi [6.7K]

Answer:

Mainframes

Explanation:

Mainframes are utilized by many major corporations and government agencies. They are also used in banking, accounting, and healthcare to name a few.

4 0
3 years ago
Other questions:
  • Your client expresses that they want their new website to have a responsivedesign with consistent coding. They are concerned wit
    5·1 answer
  • What is the program that searches through data bases?
    10·1 answer
  • Write an algorithm which gets a number N, and prints all the natural numbers less than or equal N. 3.
    5·1 answer
  • A disk drive’s data ____________________ rate is a summary performance number combining the physical aspects of data access with
    10·2 answers
  • ___ is a family of data formats that helps people automatically receive feeds anytime there are new postings to their favorite b
    14·1 answer
  • ____ is an approach to boundary spanning which results from using sophisticated software to search through large amounts of inte
    5·1 answer
  • int myArray-11,3,-8,30,-2,0,5,7,-100,44); Write a loop statement to display the positive numbers each on a separate line like th
    6·1 answer
  • The physical layer of the OSI model is not foundational to any of the other layers. True or False
    8·1 answer
  • PLEASE HELP ME WITH MY UNIT TEST!!!!!!!!!!!!!! I'M STRUGGLING AND I AM ESPECIALLY STUCK ON THIS ONE!!!!!!!!!!!!!!!!!!!!!! FOR BR
    7·1 answer
  • The force of impact is
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!