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
Margarita [4]
3 years ago
15

What is Processor to Memory Mismatch problem?

Computers and Technology
1 answer:
Gala2k [10]3 years ago
8 0
Direct-mapped cache;
fully associative cache;
N-way-set-associative cache.
That is all I could find sorry I can’t help
You might be interested in
A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors, excluding itself. For e
Ad libitum [116K]

i = 1

while i < 10001:

   total = 0

   x = 1

   while x < i:

       if i % x == 0:

           total += x

       x+=1

   if total == i:

       print(str(i)+" is a perfect number")

   i += 1

When you run this code, you'll see that 6, 28, 496, and 8128 are all perfect numbers.

5 0
3 years ago
Prompt the user to enter a string of their choosing. Output the string. (1 pt) Ex: Enter a sentence or phrase: The only thing we
frosja888 [35]

Answer:

Explanation:

Section 1) Enter String and Output String

#include<iostream> //for input and output  

#include <string>  // for string  

using namespace std;  

int main()  

{  

   string sentense;

   cout<<"Enter a sentence or phrase: ";

  getline(cin,sentense);

  cout<<"You Entered :"<<sentense;

   return 0;  

}

Output

Enter a sentence or phrase: The only thing we have to fear is fear itself

You Entered :The only thing we have to fear is fear itself

Explanation

To get full sentence or phrase, we need to call getline function in string package which will get the overall entered string. cin will not get the whole sentence

Section 2) GetNumOfCharacters

int getNumberOfCharacters(string sentence){

int count =0;

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

 count++;

}

return count;

}

Explanation

As we have taken sentence as string in previous section, we need to count total number of characters in the input string. for that purpose we are iterating over all the characters within string through for loop. declaring count variable and initializing it with 0 and increment on every for loop iteration. at the end returning the count variable.

Section 3) Call the GetNumOfCharacters() in main method.

int main()  

{  

   string sentence;

   cout<<"Enter a sentence or phrase: ";

  getline(cin,sentence);

  cout<< getNumberOfCharacters(sentence);  //Here we call out method and output its value

   return 0;  

}

Explanation

In main method first we get the sentence with getline and then by using cout and calling the getNumberOfCharacters(sentence) function it will show the number of characters in string.

Output

Enter a sentence or phrase: The only thing we have to fear is fear itself

45

Section 4) Implement OutputWithoutWhitespace() function

#include<iostream> //for input and output  

#include <string>  // for string  

using namespace std;  

int getNumberOfCharacters(string sentence){

int count =0;

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

 count++;

}

return count;

}

void OutputWithoutWhitespace(string sentence){

string output="";

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

 if(sentence[i]!=' ' && sentence[i] != '\t'){  // checking the tab and spaces

  output+=sentence[i];  //then add that into output string

 }

}

cout<< output;

}

int main()  

{  

   string sentence;

   cout<<"Enter a sentence or phrase: ";

  getline(cin,sentence);

  OutputWithoutWhitespace(sentence);

   return 0;  

}  

Code Explanation

In OutputWithoutWhitespace() function we get string as a parameter and iterating all the characters and if current iteration character from sentence string is not equal to tab('\t') and space then add that character into output string. After the loop is finished, output the result.

Output

Enter a sentence or phrase: The only thing we have to fear is fear itself       hello

Theonlythingwehavetofearisfearitselfhello

7 0
3 years ago
Exercise1 : Defining Circle type and Creating a Driver Circle class private members double radius double xPos double yPos public
asambeis [7]

Answer:

Aee explaination

Explanation:

1) class_circle.h

#include<iostream>

#include<cmath>

#include<iomanip>

#define PI 3.14159

using namespace std;

class circle

{

private:

double radius,xPos,yPos;

public:

double diameter();

double area();

double circumference();

double getRadius();

double getX();

double getY();

void setX(double x);

void setY(double y);

double distanceToOrigin();

bool intersect(const circle& otherCircle);

bool setRadius(double r);

};

class CircleDriver:public circle

{

private:

circle circ1;

circle circ2;

void obtainCircles();

void printCircleInfo();

public:

void run();

};

2) class_circle.cpp

#include "class_circle.h"

double circle::diameter()

{

return (radius * 2);

}

double circle::area()

{

return PI * radius * radius;

}

double circle::circumference()

{

return 2 * PI * radius;

}

double circle::distanceToOrigin()

{

return sqrt((xPos * xPos) + (yPos * yPos));

}

double circle::getRadius()

{

return radius;

}

double circle::getX()

{

return xPos;

}

double circle::getY()

{

return yPos;

}

void circle::setX(double x)

{

xPos = x;

}

void circle::setY(double y)

{

yPos = y;

}

bool circle::setRadius(double r)

{

if(r > 0)

{

radius = r;

return true;

}

else

{

radius = 0;

return false;

}

}

bool circle::intersect(const circle& otherCircle)

{

double dist1 = (radius - otherCircle.radius) * (radius - otherCircle.radius);

double dist2 = ((xPos - otherCircle.xPos) * (xPos - otherCircle.xPos)) + ((yPos - otherCircle.yPos)*(yPos - otherCircle.yPos));

double dist3 = (radius + otherCircle.radius) * (radius + otherCircle.radius);

if((dist1 <= dist2 ) && (dist2 <= dist3) && (dist1 < dist3))

return true;

else

return false;

}

void CircleDriver::obtainCircles()

{

double x,y,rad;

cout<<"Enter xPos yPos circle 1 :";

cin>>x>>y;

do

{

cout<<"\n\nEnter radius for circle 1 :";

cin>>rad;

}while(rad <= 0);

circ1.setX(x);

circ1.setY(y);

circ1.setRadius(rad);

cout<<"\n\nEnter xPos yPos circle 2 :";

cin>>x>>y;

do

{

cout<<"\n\nEnter radius for circle 2 :";

cin>>rad;

}while(rad <= 0);

circ2.setX(x);

circ2.setY(y);

circ2.setRadius(rad);

}

void CircleDriver::printCircleInfo()

{

cout<<setprecision(6)<<endl;

cout<<"\n\nInformation for Circle 1:"<<endl;

cout<<"location:( "<<circ1.getX()<<" ,"<<circ1.getY()<<" )"<<endl;

cout<<"diameter: "<<circ1.diameter()<<endl;

cout<<"area: "<<circ1.area()<<endl;

cout<<"circumference: "<<circ1.circumference()<<endl;

cout<<"distance from the origin: "<<circ1.distanceToOrigin()<<endl;

cout<<"\n\nInformation for Circle 2:"<<endl;

cout<<"location:( "<<circ2.getX()<<" ,"<<circ2.getY()<<" )"<<endl;

cout<<"diameter: "<<circ2.diameter()<<endl;

cout<<"area: "<<circ2.area()<<endl;

cout<<"circumference: "<<circ2.circumference()<<endl;

cout<<"distance from the origin: "<<circ2.distanceToOrigin()<<endl<<endl;

if(circ1.intersect(circ2))

cout<<"The circles intersect."<<endl;

else

cout<<"The circles does not intersect."<<endl;

}

void CircleDriver::run()

{

obtainCircles();

printCircleInfo();

}

3) main.cpp

#include "class_circle.h"

int main()

{

CircleDriver myDriver;

myDriver.run();

return(0);

}

Please refer below output for reference

Enter xPos yPos circle 1 :0.0 50.0

Enter radius for circle 1 :100.0

Enter xPos yPos circle 2 :50.0 0.0

Enter radius for circle 2 :100.0

Information for Circle 1:

location:( 0 ,50 )

diameter: 200

area: 31415.9

circumference: 628.318

distance from the origin: 50

Information for Circle 2:

location:( 50 ,0 )

diameter: 200

area: 31415.9

circumference: 628.318

distance from the origin: 50

The circles intersect.

Process returned 0 (0x0) execution time : 18.245 s

Press any key to continue.

8 0
3 years ago
Jerry is having trouble finding the information that he needs from his search results. Which technique would you suggest he use
andrew-mc [135]
Put parentheses around keywords
8 0
3 years ago
Read 2 more answers
Hello join please I would be so happy if y’all did
Luda [366]

Answer:

i bet its a class raid

Explanation:

its gonna be a class raid

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which one cost more Broken bones or a Broken Computer? Explian ur answer
    12·2 answers
  • How does this splitting wedge make work easier?
    15·1 answer
  • You can install several printers on your machine, but at least one must be the _______ printer.
    6·1 answer
  • The creation of​ __________ with digital media allows for large quantities of numerical or textual data to be searched online by
    10·2 answers
  • Advertising is organized around four distinct groups. The _____ group includes the photographers, the illustrators, video produc
    9·1 answer
  • Write down the steps that you will take to organize your files
    12·2 answers
  • 1. How has ESPN handled the rise of Twitter? How has it incorporated Twitter into Sports Center?
    7·2 answers
  • You have a notebook computer and wish to connect to an IEEE 802.11ac wireless network. The computer does not have a built-in WLA
    15·1 answer
  • Employees in your organization regularly need to print sensitive documents. The employees properly dispose of the hard copies of
    14·1 answer
  • What relationship do MP3s and MP3 players have with video files?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!