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
Setler [38]
3 years ago
13

Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a ne

wline character) where N is the value of the argument received. Write a statement that invokes printStars to make a line of 35 stars.
Computers and Technology
1 answer:
trasher [3.6K]3 years ago
7 0

Answer:

printStars(35);

Explanation:

public class Question {

   public static void main(String args[]) {

     printStars(35);

   }

   public static void printStars(int numberOfStars){

       for(int i = 1; i <= numberOfStars; i++){

           System.out.print("*");

       }

       System.out.print("\n");

   }

}

You might be interested in
Currently, this program will add 6 and 3 together, output the math problem and output the answer. Edit this code so that a rando
Yakvenalex [24]

I've included my code in the picture below. Best of luck.

6 0
3 years ago
Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smalle
almond37 [142]

Answer:

Check the explanation

Explanation:

10

5

3

21

2

-6

the output will be somthing like this:

2 21

You can then suppose that the list of integers will contain at least 2 values.

4 0
3 years ago
You have a slicer and a chart on the same page for your sales data by state. If you use the menu to sort by territory in alphabe
tekilochka [14]

If a person is known to use the menu to sort by territory in alphabetical order, the effect will that have on the slicer and the chart is that The slicer will be sorted alphabetically.

<h3>What is meant by alphabetical order?</h3>

We  are known to be people who like to sort letters and words in a way that is alphabetical in nature.

This implies that one does this to order them as they are known to appear in the alphabet.

Hence, if sorting words in to alphabetical order, we often look at the first letter of the word and as such, If a person is known to use the menu to sort by territory in alphabetical order, the effect will that have on the slicer and the chart is that The slicer will be sorted alphabetically.

See full question below

You have a slicer and a chart on the same page for your sales data by state. If you use the menu to sort by territory in alphabetical order, what effect will that have on the slicer and the chart?

Select an answer:

Everything on the page will be sorted alphabetically by territory.

Only text items will be sorted alphabetically by territory, but chart items must be sorted separately.

The chart will be sorted alphabetically by territory, but the slicer will be unchanged.

The slicer will be sorted alphabetically by territory, but the chart will be unchanged.

Learn more about alphabetical order from

brainly.com/question/26971639

#SPJ1

6 0
1 year ago
class llist { private: record * start; char filename[16]; int readfile(); int writefile(); record * reverse(record * ); void cle
Sophie [7]

Answer:

See Explaination

Explanation:

#include <cstdlib>

#include <iostream>

#include <iomanip>

#include <fstream>

#include <string>

#include <sstream>

using namespace std;

struct Person

{

string name;

string addr;

string phone;

string id;

};

const int MAX_SIZE = 8;

void addData(Person list[], int& size);

void dispData(const Person list[], int size);

void delData (const Person list[], int size);

void saveFile(const Person list[], int size);

void openFile(Person list[], int& size);

char getMenuResponse();

int main(int argc, char *argv[])

{

Person contactList[MAX_SIZE];

int numOfRecs = 0;

bool run = true;

do

{

cout << "Address Book - " << numOfRecs << " Number of Contacts" << endl;

switch ( getMenuResponse() )

{

case 'A': addData(contactList, numOfRecs); break;

case 'D': dispData(contactList, numOfRecs); break;

case 'T': delData(contactList, numOfRecs); break;

case 'O': openFile(contactList, numOfRecs); break;

case 'S': saveFile(contactList, numOfRecs); break;

case 'Q': run = false; break;

default : cout << "That is NOT a valid choice" << endl;

}

} while (run);

cout << endl << "Program Terminated" << endl;

return EXIT_SUCCESS;

}

void addData(Person list[], int& size)

{

Person tmp;

char response;

char str[256];

if (size < MAX_SIZE) {

system("cls");

cout << "Enter Contact Information" << endl << endl;

cout << "Name: ";

cin.getline(str, 256, '\n');

tmp.name = str;

cout << endl;

cout << "Address: ";

cin.getline(str, 256, '\n');

tmp.addr = str;

cout << endl;

cout << "Phone Number: ";

cin.getline(str, 256, '\n');

tmp.phone = str;

cout << endl;

cout << "E-mail id Address: ";

cin.getline(str, 256, '\n');

tmp.id = str;

cout << endl;

cout << "Add Contact to Address Book? (y/n) ";

cin >> response;

if (toupper(response) == 'Y')

list[size++] = tmp;

} else {

cout << "Sorry, Address Book is currently full." << endl;

system("pause");

}

system("cls");

}

void dispData(const Person list[], int size)

{

system("cls");

if(size < 1)

{

cout << "Nothing to display" << endl;

} else {

cout << "Contacts :" << endl << endl;

cout << fixed << setprecision(2);

cout << "Contact Name Address Phone No. ID" << endl;

cout << left;

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

{

cout << setw(10) << list[i].name << right

<< setw(10) << list[i].addr<<right

<< setw(10) << list[i].phone<<left

<< setw(15) << list[i].id<<left<<endl;

}

cout << right << setw(3) << size;

cout << " Contacts"<< endl;

}

system("PAUSE");

system("cls");

}

void delData(const Person list[],int size) {

vector<Person> :: iterator vItr = Contact.begin();

while (vItr != Contact.end() )

{

if (vItr->Name == Name)

{

vItr = Contact.erase (vItr);

break;

}

else

vItr++;

}

void saveFile(const Person list[], int size) {

string fileName;

ofstream outfi;

cout<<"Enter file name: ";

getline(cin,fileName);

outfi.open(fileName.c_str());

if (!outfi.fail()) {

system("cls");

cout << "Saving Address Book to the disc ";

for(int i = 0; i < size; i++) {

outfi << list[i].name << ';'

<< list[i].addr<< ';';

if (i < size-1) outfi << endl;

}

cout << endl << size << " Address Book in the disc." << endl;

outfi.close();

system("PAUSE");

system("cls");

}

else {

cout << "ERROR: problem with file" << endl;

system("PAUSE");

system("cls");

}

}

void openFile(Person list[], int& size)

{

ifstream infi("AddressBook.txt");

string str;

stringstream strstrm;

if (!infi.fail()) {

system("cls");

cout << "Reading Address Book from the disc ";

size = 0;

while(!infi.eof() && size < MAX_SIZE)

{

getline(infi, str, ';');

list[size].name = str;

getline(infi, str, ';');

strstrm.str(""); strstrm.clear();

strstrm << str;

strstrm >> list[size].addr;

}

cout << endl << size << " read contacts from the disc." << endl;

system("PAUSE");

system("cls");

}

else {

cout << "ERROR :file not accepted" << endl;

system("PAUSE");

system("cls");

}

}

char getMenuResponse()

{

char response;

cout << endl << "take chioce" << endl

<< "(A)dd contact, (D)isplay contact0, (O)pen File, (S)ave File, (Q)uit" << endl

<< "> ";

cin >> response;

cin.ignore(256, '\n');

return toupper(response);

}

8 0
3 years ago
An OR function nested in an IF function results in
tester [92]
I think is the second one
5 0
3 years ago
Other questions:
  • 1. Engineers should not consult with experts if they do not know much about a problem.
    12·1 answer
  • How to stop getting emails from colleges?
    9·1 answer
  • Five computers are connected to a switch in a star topology. what type of network is this?
    12·1 answer
  • What is the left are if a slide in a presentation called
    15·1 answer
  • In an is framework, ________ is the bridge between the computer side on the left and the human side on the right
    12·1 answer
  • Jessica has a balance of $2,200 on her credit card with an 18% interest rate. Her credit card company doesn’t require a minimum
    15·1 answer
  • This project involves writing a program that encodes and decodes messages. The program should prompt the user to select whether
    15·1 answer
  • What method of thermal energy is at work when heat lamps are used to warm up baby chickens?
    11·2 answers
  • Areas on which the development of the computer as a communication technology is based
    5·1 answer
  • PLEASE ANSWER AND HURRY I'LL MARK YOU BRAINLIEST!!<br><br><br>​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!