- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I am an old man who is interested in, among other things, computer programming and mathematical applications of computers in particular.
- Interests
- Music, astronomy
- PC Specs
- GATEWAY WITH amd ATHLON cpu, WINDOWS 98
Re:
I need help with transposing a matrix. I already did the transpose matrix using 2 arrays. But I can't figure out how to do it using only one array. So read a matrix and create the transpose within itself. Do I use the swap or what? Any help would be … |
|
Re:
Ok, time to get off my ass and learn C and C++. However, I'm having a bit of trouble finding a free compiler; I'm a newbie so it needs to have a friendly and explanatory GUI if possible. Just post name and/or link, thanks :D |
|
Re:
Hi everybody, is there a simple way to print a floating point number in its internal representation (i.e. binary or hex) in C(C++)? Yet another question -- is there a linux utility to do the opposite thing with a binary file (i.e. choose a range of bits and convert it … |
|
A rather old C++ book I have says that one class may be declared a friend class of a second, and then the first class can access the private data of the second. I tried this example [code] #include <iostream.h> class secret { friend class not; private : int a; … |
|
Re:
Hi I have a little question which I have partly tried but I am not completely sure if I am doing it correctly. Heres the question Does the equation 2x=26(mod32) have any solutions? If it does determine them and if not then explain why. Down below is how I approached … |
|
Re:
could someone atleast point me in the right direction? i'm new at this and i've been working on this program and I just hit a brick wall. Its like my brain stopped working or something... :confused: I have to make a "stop watch" program...have a class defined for stop_watch that … |
|
Re:
Hi, I need help writing a function that determines if a number is prime. It has to print all the prime numbers between 1 and 10000 this is what i have...where i put a " [U] */* [/U] " is where i need your help..... [code]#include<iostream> using std::cout; using std::endl; … |
|
Re:
I have two snippets of code that I am having a lot of trouble with finding the closed form Summations and time complexities for: x=0; for(i=1;i< pow(2,N); i = 2*i + 2){ for(j=1;j<N ; j++){ x=x+j; } } and: x=0; for(i=1;i <= (2*n); i++){ for(j=1; j <= n; j++){ if(j<i) … |
|
I have downloaded the free Borland compiler Bcc32 and am delighted with it. I also downloaded the turbo debugger. I have a lot of experience using a debugger from an integrated environment but the Borland download includes only the command line version of the compiler and I don'y know how … |
|
Re:
Hi, I am trying to use a command setprecision from the <iomanip.h> header. It works well when i declare the number of decimals to display to the right of the decimal point, however i am attempting to have the user input how many places of precision they want. So far … |
|
In using "cin" for getting input I have about a 99% success rate. In the remaining 1% of cases the program does not pause for input. What causes this and how does one fix it? In ancient times when we programmed in C rather than C++ the same problem occurred … |
|
Re:
Hi, I'm a freshman in computer science and a new member to this forum. I'd like to convert the string representation of a number e.g "456" into its integer equivalent i.e. 456. As for character representation of single digits e.g. "6", I'm able to convert it to its integer equivalent … |
|
Calling all Dev_C++ users, Here's a mystery! The following little program, which determines whether one integer is a divisor of another or not, compiles and runs fine using Borland's bcc32. [code] #include <iostream> using namespace std; bool divides(int,int); main() { int a,b; char ch; cout << "Enter a then b: … |
|
Re:
:mrgreen: I've just started learning and doing examples out of the book but I wanted to see if I could actually make something besides just copying stuff out of a book. So I tried to make an addition calculator. This isnt the entire source code but just a few snippets … |
|
I have a question on external variables in a multifile program. Quoting from K&R (first addition, page 72) "By default, external variables are also "global", so that all references to such a variable by the same name (even from functions compiled separately) are references to the same thing." Here's an … |
|
Re:
Hello I am new to C++, I have this program which i take an input file and i have to find the average and standard deviation of the numbers in the file. I have part of the program completed but i don't know where to go from there. can someone … |
|
Re:
Hi, im lost and i need help writing a function gcd that returns the greatest common divisor of two integers and has to allow five sets of numbers to be input by the user. this is what i have so far where i put /* is where i need help … |
|
Attached is a tiny program in which the function F has as an argument the function pointer double (*f) (double). F returns the sum f(1)+f(2)+f(3)+f(4). (Naturally, I have a much more interesting application in mind, but this simple example makes the point.) What I really want to do is replace … |
|
Re:
hi , i need function to calculate primitive root for prime q that if i choose prime number q then a which is primitive must satisfy that a%q ,(a pow 2 )%q , ...... (a pow i )%q = distinct integers betwwen 1 & q-1 that 1<i < q-1 and … |
|
Re:
Hi to all I have just joined this lovely community today. I was wondering if someone would be willing to help out a newbie gal with a pseudocode problem.... Basically I am trying to write some pseudo code for the following problem - A company has some data for each … |
|
Re:
Can someone help me to figure his out. I have to read in a file that contains employee names, numbers, payrates, and hours. Then I have to calculate the gross andsend everything to an output file. I keep getting this error message "employee.cpp" 69 lines, 1471 characters $ c++ employee.cpp … |
|
Re:
[code] #include <stdio.h> #include "Boolean.h" #include "combinatorics.h" /* For all the functions below, return TRUE if the calculation is successful, FALSE if overflow occurs Return the calculated value in the pass by reference parameter provided */ Boolean calcFactorial (int n, int* nfact) { *nfact = 1; while(n > 0) { … |
|
Re:
I have a problem that I am not sure how to even come up with a solution. So, I was wondering if anyone would have any input to the problem at hand. I have to divide a matrix that is defined by an input file into 2 distinct regions so … |
|
Re:
Floating Point Representation: I have to convert 21.426304 into an Unnormalized number. It has to be 16 bits long with a 1 bit sign, 5 bit exponent, and a 10 bit sinificand. I understand that you have to take the fraction of the original number or something along those lines … |
|
Re:
I would appreciate any input anyone might have for the following problem: Describe the worst-case time complexity, measured in terms of comparisons, of the following searching algorithm: (x: increasing integer a1, a2, a3.... an) i=1//left end point j=n//right end point while (i<j) t=[ (i+j/3) ] begin if ( x < … |
|
Re:
I am working on a lab and having trouble developing a class to run with the program. I have completed all the arithmetic for the program but not sure how to included the functions in with a "class". The instructions are to develope class called "rational"- and should contain the … |
|
Re:
hi im tryin to read some info (both characters and integers) from an input file and save them into the sorted list. it is a big project and i cant put all the files i have over here. so i'll just put the part im having a problem. i have … |
|
Re:
Hello, can anybody help me please? I am new to C++. I need help with assignment that calculate income tax. thank you. instruction: ******* 1.Set up a project called CTax. 2.Add to your project a class called GRTax. 3.The member variables for this class are: float mTaxableIncome, float mTaxRate, and … |
|
Re:
After having us write codes to convert decimal numbers to another base my faculty has now asked me to write codes to convert a number from ANY base to another. He explains that itz simple since i already wrote the program to convert integer to another base. So i just … |
|
Re:
i am trying to make a program that displays to the screen the prime factors of a given number. i have it all the way to the prime number checking i dont quite understand how to extract the prime numbers any help would be much appreciated |