Answer:
Answered
Explanation:
= -21
value of 21 =
= -32+4+2+1= -24
value of 25 = (011001)_2
face varying degrees of punishment.
are taught how to use technology positively.
are forced to do community service.
Answer: The Answer is B. face varying degrees of punishment.
Hope this helps! ^^ (also i know this is the right answer because i got it correct)
Answer:
b
Explanation: the punishment depends on the severeness , so we dont know the exact punishment
Answer:
I THINK FALSE
Explanation:
Answer:
def future_investment_value(investment, monthly_interest_rate, years):
print("Years\tFuture Value")
print("- - - - - - - - - - -")
for i in range(1, years+1):
future_value = investment * ((1 + monthly_interest_rate) ** (12 * i))
print(i, "\t\t", format(future_value, ".2f"))
investment = float(input("Enter the invesment amount: "))
interest = float(input("Enter the annual interest rate: "))
year = int(input("Enter the year: "))
future_investment_value(investment, interest/1200, year)
Explanation:
Inside the function:
- In the for loop that iterates through the years, calculate the future value using the formula and print the results
Then:
- Ask the user for the investment, annual interest rate, and year
- Call the function with the given inputs
class
object
abstract class
Answer:
Operation the correct answer for the given question.
Explanation:
An operation is a template that is used as a template parameter .An operation defined the services and behaviors of the class .The operation is directly invoked on instance .
Attribute define the property of an entity it is not defined the services and behaviors of the class. so this option is incorrect.
Class is the class of variable of method it is not defined the services and behaviors of the class so this option is incorrect.
Object are the rub time entity .object are used access the property of a class it is not defined the services and behaviors of the class so this option is incorrect.
Abstract class is the class which have not full implementation of all the method .it is not defined the services and behaviors of the class so this option is incorrect.
So the correct answer is operation.
Answer:
1. Get the number
2. Declare a variable to store the sum and set it to 0
3. Repeat the next two steps till the number is not 0
4. Get the rightmost digit of the number with help of remainder ‘%’ operator by dividing it with 10 and add it to sum.
5. Divide the number by 10 with help of ‘/’ operator
6. Print or return the sum
# include<iostream>
using namespace std;
/* Function to get sum of digits */
class gfg
{
public:
int getSum(float n)
{
float sum = 0 ;
while (n != 0)
{
sum = sum + n % 10;
n = n/10;
}
return sum;
}
};
//driver code
int main()
{
gfg g;
float n = 687;
cout<< g.getSum(n);
return 0;
}
Explanation: