578 Topics
| |
hello I have done this program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle. Using an enumeration type, triangleType, that has the values scalene, isosceles, equilateral, and notTriangle. so the problem i ma having with the program … | |
I've been working hard all day to get this to work. I'm playing around with the math module in python. I eventually want the following code to help me control the speed of a servo motor. The idea is to get the servo speed to accelerate and then decelerate as … | |
Hello guys, I know it's been asked a lot about it here, but that's what I should do (though I'm not quite sure what the teacher wants, is n should be 100, 1000 and further, or use prime numbers. The "first draft" is due this Sunday, the "final draft" is … | |
So I started to work on my last Computer Science project for the school year, a maths tutorial application. I'm a bit stuck with displaying a form to explain a mathematical concept. I decided to make a dynamic form on run-time for each grade which then contains all the available … | |
Here is my code, for some reason it goes to an infinite loop when i try and adjust the highest and lowest values for the Math.Random() method. The code works fine if i do not try to change those values based on if the guess was higher or lower than … | |
I have created class menu and class number. I would like that my functions in class do sum, subtract, multiply, and divide. I've done sum, but I have problems with other functions. When I do difference, it is actually sum my numbers, and result of multiplication and division is 0 … | |
Hi there, im new to the site and am hoping someone out there can help me with my question, im pretty newbie in the world of c++ and programming in general. Im making a program with a menu, you can choose between entering a number yourself to be tested as … | |
I am trying to learn parameters by reference. In my code i try to compute the sum between 1 and n. This is what i got so far and if i input 5 it outputs a extremely high number. Any suggestions? [CODE] #include <iostream> #include <cmath> using namespace std; void … | |
I'm working on an a grading program that will require the use of a couple classes. The program contains a list of "program assignments" which there are 5, and 3 test scores. The Driver class contains the scores for the students. I'm stuck writing the average methods :$ Along with … | |
Hi....... This code is useful to check given string is palindrome or not. Actually, there are some other way also to check palindrome. So, be careful which code gives better efficiency. You can [COLOR="Red"]comment the line[/COLOR][COLOR="Green"]-bool caseignore= str.Equals(revstr, StringComparison.OrdinalIgnoreCase);[/COLOR] and in [B][COLOR="Red"]if[/COLOR][/B] condition you can use- if(string.Compare(str,revstr,true)==0) | |
I'm currently having an issue with moving the camera around the z-axis (roll). For debugging purposes, I have an object with which I've tested with all 3-axis rotation and movement and it's working as expected; the object in question as well as the camera class superseed a positions class for … | |
I'm having trouble with a for loop! I'm trying to solve a differential equation using Euler's method like so; [TEX]\displaystyle\frac{dy}{dx} = 7{y^2}cos(y^2)-3e^{xy}, \ \ \ 0 \leq x \leq 1 \ \ \ y(0) = 0[/TEX] This is solved using the algorithm [TEX]y_{n+1} = y_n + hf(x_n , y_n)[/TEX] Where … | |
how can i find value of Acos without using math library of c#??i have serch for more time in the web!thank you | |
Hey there, I'm having trouble creating a multiplication function for the program as I have two classes to keep in mind (Monomial and Polynomial). And if possible, a little advice on how to make my for statements in the arithmetic operators more flexible to user input such as i<PolynomialSize, which … | |
the basic idea of what im trying to do is write a program that reads an arbitrary number of integers less than 20. then it prints out the position of the integer in the order the user inputed it then it finds the sum when it scans a non integer … | |
Hi guys, I hv the two coordinates of the map. Top left : 37 44 55.49S 144 52 30.73E bottom right: 37 47 54.43S 144 57 59.54E my map is a rectangle with 500width 800height. I want to get the mouse pointer in terms of lat long in degrees and … | |
Okay, so I have created and array of a maximum degree, which the user defines, and then inputs their own coefficients according to the size of the polynomial. For example, I ask for degree, they type 2, and then input 1,3 and 5 to create a polynomial: 1 + 3x … | |
hey guys, How to convert the lat/long (in decimal) to x,y pixel. my map has a height and width of 800,500 thnx regards, Nishan | |
[CODE]please help me in doing my project in one of my subject in college. it is all about getting the GCD of fractions... can anyone tell me the logic or the formula for getting it? tnxx in advance[/CODE] | |
Scanning from a laser line and usb cam V Python fill up memory to 1.6G and crash the system Smaller Scan works fine is there a better plotting module or a way of getting past V Python memory block? The plot must happen in color xyz rgb. [CODE]import thread import … | |
How do you perform hexadecimal addition in C++? like ACD2 + 23E1 = D0D3 5A72 + 4573 = 9FE5 ___________________________________________________ the addends will be asked by the program then the program should show the sum ___________________________________________________ the addends required are only 2 | |
please help know how to get the GCD of fractions... i'm stuck in program because of this... any suggestions will do. tnx | |
I'm trying to do addition of matrices using pointers. But, in 3x3 matrix, only the first row of the matrix gets added, while the rest are zero. Please help me correct this. Thank You! My code is as follows :: [CODE] #include<stdio.h> #include<conio.h> int a[10][10],b[10][10],c[10][10]={0}; int i=0,j=0,k=0; int r1,c1,r2,c2; void … | |
Hi all, I'm fairly new to VB. I'm working on a Windows forms app that will average a set of numbers, the only catch is that there are 10 textboxes(4 in the example for times sake), and not all of the textboxes could be filled with a number... I know … | |
When realising the following operation: [CODE]do = 1.0 - 2.718281828**(-(23**2)/730) print do[/CODE] Python returns 0.632120558766 When you do it on the calculator or when google it, it returns 0.515509538 :-O | |
I have a series of data (x,y) as below. I want to use this data to create a bell curve (normal distribution) with perl. How can I do this? x y 1 2 2 50 3 40 4 300 5 70 6 80 7 8 8 10 9 25 10 … | |
hi all, i have a little issue with SUM query from this table UNIQUEID Date Production engine1 01/12/1999 1440 engine1 01/01/2000 6061 engine1 01/02/2000 5152 engine1 01/03/2000 5347 engine1 01/04/2000 4642 engine1 01/05/2000 5264 engine1 01/06/2000 5247 engine2 01/07/1995 561 engine2 01/08/1995 3066 engine2 01/09/1995 2133 engine2 01/10/1995 2282 engine2 … | |
Say 3 integers are giving: 3, 4, 16 how does one go about writing a program to find the least common denominator? greatest common divisor? etc.. I was wondering if there is a way to use the multiples and then select the number that matches up, in this case 48 … | |
I have writen a code for adding (math +) two arrays. Actually, I have two arrays of a class I have also designed, that has two attributess, one of wich is an integer. I would like to sum (add element by element) one array on the other by adding the … | |
0 down vote favorite I'm trying to figure out how exactly to use stat() to capture information about a file. What I need is to be able to print several fields of information about a file. So.. [CODE] #include <iostream> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> using namespace std; int … |
The End.