Category : math

My assignment is to make use of while loop in a following task: to print the inputted integers into separate lines. Given instructions: 1. Create a variable and input a random positive integer. 2. Using while loop, print out each digit of the inputted integer in separate lines, starting from its rightmost digit until the ..

Read more

enter image description here This is my implementation of the given expression, is it correct ? #include <iostream> #include <cmath> using namespace std; double mathExpression(double a, double b, double x, double k ) { return 2 * a * pow(x, k) * exp(-3 * (a * b + log(2) * x)) – 3 * sqrt(pow(abs(a ..

Read more