#### Category : math

I have parallelogram points A,B,C,D. How can i calculate the angle of 90 degrees knowing only these points. My functions is as follows: void RotateRight() { int h = northEast.y – southWest.y; int p = southEast.x – northWest.x; int q = southWest.x + northEast.x; } Dont know what to do next. Any help appreciated. I ..

Hey guys any help would be appreciated: Doing a Code wars problem to find a prime number given an integer value. It seems my program is working properly but for some reason, it fails the prime number test. There seem to be some outlier numbers that cause it to fail but I can’t find it ..

#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main() { char x ; double c, f{}; cout << "welcome" << endl ; cout << "press C for celcius to far, press F for opposite direction."; cin >> x ; if (x == ‘C’) { cout << "enter a value…"; cin >> c ; ..

I am currently a beginner in coding with C++ and as I am starting I would like to trend my path towards mathematics and cryptography. I am currently studying abstract algebra and mathematics for cryptography and would like to be able to take what I’ve learned and put it into code. For example, I’d like ..

How can I traverse a 3-D matrix in spiral way, if I have to start from any of the edge planes? I was facing issue was this problem: https://www.codechef.com/UCS32021/problems/DSMID002 Source: Windows Que..

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 ..

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 ..