Answer:
Explanation:
Since no further information was provided I created the PayLevel function as requested. It takes the Ssn as input and checks it with a premade dictionary of Ssn numbers with their according salaries. Then it checks that salary against the average of all the salaries and prints out whether it is Above, Below, or Average. The output can be seen in the attached picture below.
employeeDict = {162564298: 40000, 131485785: 120000, 161524444: 65000, 333221845: 48000}
average = 68250
def PayLevel(Ssn):
pay = employeeDict[Ssn]
print("Employee " + str(Ssn) + " is:", end=" "),
if pay > average:
print("Above Average")
elif pay < average:
print("Below Average")
else:
print("Average")
PayLevel(161524444)
PayLevel(131485785)
In this way, writing the code in C++ we can say that it will be possible to make the coordinates on the planes.
<h3>Writing the code we have:</h3>
<em>#include <iostream></em>
<em>#include <cmath></em>
<em>#include <iomanip></em>
<em>using namespace std;</em>
<em>class Point{</em>
<em>private:</em>
<em>float x;</em>
<em>float y;</em>
<em>public:</em>
<em>Point(){ </em>
<em>x = y = 0;</em>
<em>}</em>
<em>Point(float x, float y){ </em>
<em>this->x = x;</em>
<em>this->y = y;</em>
<em>}</em>
<em>float getX(){ </em>
<em>return x;</em>
<em>}</em>
<em>float getY(){</em>
<em>return y;</em>
<em>}</em>
<em>float getDistance(){</em>
<em>return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2));</em>
<em>}</em>
<em>string toString(){ </em>
<em>return "("(x1, y)","(x2, y2)")";</em>
<em>}</em>
<em>};</em>
See more about C code at brainly.com/question/17544466
#SPJ1
Answer:
The code is given below. Follow the question and the code definitions for better understanding.
Explanation:
#include<iostream>
#include<string>
using namespace std;
int main(){
string pastWord="";
string currentWord,nextWord;
int n,t;
int singleton=0;
int consecutive=0;
cout<<"Enter words. ('xxxxx' to exit):\n";
cin>>nextWord;
do{
currentWord=nextWord;
cin>>nextWord;
if ( (currentWord!=pastWord)&&(currentWord!=nextWord) )
singleton++;
else if((currentWord==pastWord)&&(currentWord!=nextWord))
consecutive++;
pastWord=currentWord;
}while(nextWord!="xxxxx");
n=singleton;
t=consecutive;
cout<<"There were "<<n<<" singletons and "<<t<<" consecutive repetitions.";
cin.get();
return 0;
}
Answer:
dgfdghvcsdhjccxadhhvcsdhjvczafjmbd FYI jjgdc
Portable car defroster, defogger 12V heater