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
WITCHER [35]
3 years ago
5

Read the following code carefully and do as directed: int main() { // Initialising starting number int num = 1; int n=7 // Outer

loop to handle number of rows // n in this case for (int i = 0; i < n; i++) { // Inner loop to handle number of columns // values changing acc. to outer loop for (int j = 0; j <= i; j++) { // Printing number cout << num << " "; // Incrementing number at each column num = num + 1; } // Ending line after each row cout << endl; } You need to answer following questions. 1. Draw Control Flow Graph for the given code 2. Highlight all regions in the flow graph separately 3. Using cyclometic complexity formula, calculate number of basis path tests.
Computers and Technology
1 answer:
Wittaler [7]3 years ago
4 0

Answer:

81

Explanation:

12734

You might be interested in
C++
daser333 [38]

#include<iostream>

#include <fstream>

#include <vector>

#include <string>

#include "StatePair.h"

using namespace std;

int main() {

ifstream inFS;

int zip;

int population;

string abbrev;

string state;

unsigned int i;

vector<StatePair <int, string>> zipCodeState;

vector<StatePair<string, string>> abbrevState;

vector<StatePair<string, int>> statePopulation;

inFS.open("zip_code_state.txt");

if (!inFS.is_open()) {

    cout << "Could not open file zip_code_state.txt." << endl;

    return 1;

}

while (!inFS.eof()) {

    StatePair <int, string> temp;

    inFS >> zip;

    if (!inFS.fail()) {

        temp.SetKey(zip);

    }

    inFS >> abbrev;

    if (!inFS.fail()) {

        temp.SetValue(abbrev);

    }

    zipCodeState.push_back(temp);

}

inFS.close();

inFS.open("abbreviation_state.txt");

if (!inFS.is_open()) {

    cout << "Could not open file abbreviation_state.txt." << endl;

    return 1;

}

while (!inFS.eof()) {

    StatePair <string, string> temp;

    inFS >> abbrev;

    if (!inFS.fail()) {

        temp.SetKey(abbrev);

    }

    getline(inFS, state);

    getline(inFS, state);

    state = state.substr(0, state.size()-1);

    if (!inFS.fail()) {

        temp.SetValue(state);

    }

    abbrevState.push_back(temp);

}

inFS.close();

inFS.open("state_population.txt");

if (!inFS.is_open()) {

    cout << "Could not open file state_population.txt." << endl;

    return 1;

}

while (!inFS.eof()) {

    StatePair <string, int> temp;

    getline(inFS, state);

    state = state.substr(0, state.size()-1);

    if (!inFS.fail()) {

        temp.SetKey(state);

    }

    inFS >> population;

    if (!inFS.fail()) {

        temp.SetValue(population);

    }

    getline(inFS, state);

    statePopulation.push_back(temp);

}

inFS.close();

cin >> zip;

for (i = 0; i < zipCodeState.size(); ++i) {

 }

for (i = 0; i < abbrevState.size(); ++i) {

 }

for (i = 0; i < statePopulation.size(); ++i) {

}

}

Statepair.h

#ifndef STATEPAIR

#define STATEPAIR

#include <iostream>

using namespace std;

template<typename T1, typename T2>

class StatePair {

private:

T1 key;

T2 value;

public:

StatePair()

{}

void SetKey(T1 key)

{

this->key = key;

}

void SetValue(T2 value)

{

this->value = value;

}

T1 GetKey() { return key;}

T2 GetValue() { return value;}

void PrintInfo()

{

cout<<key<<" : "<<value<<endl;

}

};

3 0
1 year ago
The 60-watt light bulb has a 400 hour life expectency how much will it cost to operate during its time
expeople1 [14]

Answer:

$2.40

Explanation:

the unit electricity bill is kilo watt hour.

The 60-watt light bulb has a 400 hour life expectency means it will consume

60×400/1000 = 24 KWh units of electricity. Let us suppose each unit of electricity costs is 10 cents.

Then 24×10 = 240 cents  = $2.40

5 0
3 years ago
The World Wide Web Consortium enforced a stricter set of standards in a different version of Hypertext Markup Language (HTML) ca
Eva8 [605]

Answer:

Option B is the correct answer for the above question

Explanation:

XHTML is an advanced version of HTML language which is recommended by W3C. It set the standard in 26-JAN-2000 for the XHTML which belongs to the family of HTML. XHTML is made with the help of XML and also used like XML. It used to create more secure websites.

The Above question asked about the W3C recommendation but the above paragraph described that XHTML is a W3C recommendation. Hence Option B is the correct choice answer. while the other is not because--

  • Option A suggests HTML 4.01 which is the updated version of HTML only.
  • Option C suggests XML which is used to data transfer only.
  • Option D suggests about DHTML but XHTML is a W3C recommendation
5 0
2 years ago
Who conceptualizes the design and the working of a website
Citrus2011 [14]
Answer is "Web Designer".

Web Designers are the "artists" of the website. They conceptualize the layout and functionality of the site, from features to format. They may do little coding, and are mostly involved in the creative elements of web design. The Web Developer is less big-picture, and more knitty-gritty building of the website. She is the one who does the coding and actually builds the website, using the web designer's model. 
3 0
3 years ago
Tell me something about "nuclear power station" (help)​
iren2701 [21]

Answer:

A nuclear power plant is actually a thermal power station in which the heat source is a nuclear reactor.

Explanation:

Ask me more if you want more.

8 0
3 years ago
Other questions:
  • DSL technology is less efficient for service providers in the United States because many of their customers live in less-densely
    11·1 answer
  • How can i do a back up on one computer and save it to the hard drive in another computer without it being seen by others on the
    9·1 answer
  • A food web is shown below. In this food web, energy is transferred directly from the to the
    11·1 answer
  • Enter the number 2568 into the box below
    14·1 answer
  • Computer Architecture
    7·1 answer
  • PLEASE ANSWER THIS ASAP‼️
    10·2 answers
  • what is the arrangement of various flash elements, such as the tools panel, control panel, property inspector and stage
    12·1 answer
  • Terence creates software requirements specification (SRS) documents for various software development projects. In which phase of
    6·1 answer
  • A toolbar of round buttons that appear when you move the mouse when in Slide Show view id called ____________.A toolbar of round
    8·1 answer
  • I will give brainyest
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!