My python program about radical numbers that i created isnt working as i want. √72 = 6√2. But my program shows: 2√18. Lets say that a√b is a variable. I want ‘b’ to be the least value. How can i do that? My program is so big so i can’t write all of them. So ..

#### Category : math

I am sure about that there aren’t any mistakes in my class. I can’t give all codes because the program is big. The program is about radical numbers. Such as converting √8 to 2√2. I am going to use this class in my main python file. Here are the codes: def kokluyazdir(self,number): i = 1 ..

I was bored so I wrote a modulo operator in C++. When I enter 17 and 2 (17 % 2), it returns 7 instead of 1. What did I do wrong? #include <iostream> #include "Header.h" double modulo(double number1, double number2) { int counter=0; double result1=0; double result2 = 0; while (number1 / number2 > result1) ..

to practice C++ i decided to write a modulo function. but it returns -nan(ind) how can i make it that the return is the rest of the division? #include <iostream> #include "Header.h" double modulo(double number1, double number2) { double intermediate_result_1=5; double result; int counter = 0; while (intermediate_result_1 < number1) { counter++; intermediate_result_1 = number2 ..

The Problem Statement is: You’ve to display the digits of a number. Take as input "n", the number for which digits have to be displayed. Print the digits of the number line-wise. #include<iostream> #include<cmath> using namespace std; int main(){ int n; cin>>n; int nod = 0; int temp = n; while(temp != 0){ temp = ..

I implemented a CS paper to solve for geodesics on meshes. When I disable all optimizations I get exactly what I expect. If I enable optimizations however I get either NAN’s, infinity, or any number of weird results. I have checked all the stages of the algorithm and the error seems to happen on the ..

I am currently working on a project for my Data Structures Course that involves a Binary Search Tree built using a doubly linked list-type format (where each node has a left, right, and parent pointer). The class managing the tree also has a root pointer and a current pointer (like a cursor). One of the ..

I need to raise a fixed-point number to the third and fifth power, but the standard pow method doesn’t work. what to do in this situation Source: Windows Que..

Hey bro I need help to find prime numbers in to 10 Fibonacci numbers I mean between (0-1-1-2-3-5-8-13-21 -34). I think I should make two functions first for 10 Fibonacci numbers and second for how to find prime numbers and actually I know how to write them but how can I combine them??? (I need ..

I am working on finding out the solution for problem 22 for project Euler in C++. This is the problem: Using names.txt (right click and ‘Save Link/Target As…’), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this ..

## Recent Comments