You inquire about a credit card change.
Answer:
Average speed = 6 km/h and Average velocity = 0.67 km/h
Explanation:
Given that,
A dog walks 10 km north in 2 hours and then 8 km south in 1 hour.
(a) Average speed = total distance traveled divided by total time taken
Distance = 10+8 = 18 km
Total time = 2+1 = 3 h
Average speed = (18/3 )km/h= 6 km/h
(b) Average velocity = net displacement divided by total time taken
Let north is positive and south is negative
Displacement = 10+(-8) = 2 km
Total time = 2+1 = 3 h
Average velocity= (2/3 )km/h= 0.67 km/h
Answer:
see explaination
Explanation:
#include <iostream>
#include <string>
using namespace std;
class Employee
{
string name;
int salary;
public: Employee()
{
}
Employee(string name, int salary)
{
this->name=name;
this->salary=salary;
}
void setName(string name)
{
this->name=name;
}
void setSalary(int sal)
{
this->salary=sal;
}
string getName()
{
return name;
}
int getSalary()
{
return salary;
}
void raiseSalary(int percentage)
{
if(percentage<0)
{
cout<<"Invalid percentage";
}
else
{
salary=salary+((float)percentage/100)*salary;
}
}
};
int main()
{
int percentage;
Employee e1("Satur",1000);
cout<<"Employee details are:";
cout<<e1.getName();
cout<<e1.getSalary();
cout<<"Enter the percentage raise";
cin>>percentage;
e1.raiseSalary(percentage);
cout<<"Raise in salary:";
cout<<e1.getSalary();
return 0;
}