Beginners - February 2013 (Page 6)

If, If else coding problem
 
Hi I have to write a program that takes 2 inputs to indicate the amount of gas used and then calculate how much that amount of gas would cost according to the c...
[17 replies] Last: It's necessary to have braces if you have multiple things you want the... (by Disch)
Skipping second cin>>x
 
This is my first time posting on this forum so apologies if i haven't followed correct forum etiquette. I'm using netbeans on osx with a g++ compiler. In...
[4 replies] Last: Vin, LowestOne and Cubbi! Thanks heaps, i've solved my problem! <3 (by JingoJango)
attempting to eliminate duplicate strings in an array
 
/*Function 5: Unique word array Parameters: (string to search, integer start position, array to return words*/ int string_unique140(string str,int start,string...
[1 reply] : Edit: removed profane cout statement that was relaying current variabl... (by nerdynate)
creating an array with a struct
 
So Im trying to create an array with a size equal to the course variable of studenta. What am I doing wrong? #include <iostream> #include <string> using n...
[11 replies] Last: Ok then what you have to do is either compile with the option -std=c+... (by cire)
program that outputs the time it takes for lighg from the sun to reach the planets
 
Input output program that shows how long the speed of light takes to reach the planet's Speed of light = 186,283 miles per second Mercury 36,000,000 miles a...
[7 replies] Last: Do you mean can you put the minutes and seconds in the same block? If ... (by Danny Toledo)
Number of days per year (including leap years)
 
Hey guys! I've been working on this code to figure out the days in a year, example, 50 days have passed, but I cannot seem to get it to work. #include <stdio...
[10 replies] Last: I got it. Thank you very much! (by strongbad440)
Finding the sum of all the values of a variable.
 
Hello, I'm writing a program for my c++ class that requires me to read data from a file and the profits from each sales person. At the end i need to figure out ...
[2 replies] Last: Thank a lot. I was able to get it to compile and show the right profit... (by abledpilot)
Hello All
 
Hello All, Just popped in to say hey. I am new to programming and I am currently trying to both understand and learn c++. I will have questions for the f...
[2 replies] Last: Welcome (by Smac89)
by lifedj
How can I build a library under windows
 
Hi, I need help to do a thing that I usually do in linux, but now I'm not able to do in windows! I'm working on a Qt project and I need to use a library to ope...
[no replies]
by T4l0n
turn this array to add into a moltiplication
 
#include <iostream> using namespace std; float input(float array , int num); float output(float array , int num); int main (){ int x; cout <<...
[1 reply] : I would be surprised if this actually ran, have you tried compiling it... (by guatemala007)
Simple Calculator Problem
 
Here is the code for my simple calculator: #include <iostream> using namespace std; float a; float b; char c; float d; int main() { cout<<" Cal...
[2 replies] Last: worked great thanks so much for your help (by TheSnowman)
C++ Incompatible types: calculating allele frequencies
 
Here is what the input file looks like: 1-1_Sample 1 GCCCATGGCT 2-1_Sample 1 GAGTGTATGT 3-1_Sample 1 TGTTCTATCT 1-1_Sample 2 GCTTAGCCAT 2-1_Sample 2 ...
[no replies]
Addition with running total
 
I'm trying to write a program which works like a calculator, keeping the running total of an operation, with the number of terms not defined by the user. Here's...
[2 replies] Last: Actually, I've got another condition (which I omitted here because it'... (by verandaguy)
Will pay money for personal programming help. email only if interested
 
Joeseph Clark@yahoo.com
[no replies]
by T4l0n
can't input more than 10
 
#include <iostream> using namespace std; int main (){ int x; int y; int a; int b; cout << "insert first number "; cin >> a; ...
[3 replies] Last: That even compiles without the int being a const int, for the array in... (by Lynx876)
int to char
 
I'm having trouble getting an int to cast to char in a way that the char will display the actual value of the int. Say I have an int with a value of 5001, and ...
[3 replies] Last: The function only takes char strings, so using string is out That ne... (by Chervil)
Please help with dice roll program
 
Hello, I'm new to c++ and I have this problem. 1) Write a program to simulate rolling a pair of dice 100 times. 2) Write the logic so that: ** When the...
[10 replies] Last: Yes that's right, now I remember that. I made the same mistake last t... (by elv5022)
Problem with srand() and rand()
 
Googled around and could not find a straightforward solution. When outputting the result of rand(), the value is not random, but only gradually increases eve...
[7 replies] Last: Because each time you call rand(), its seed gets re-randomized, mostly... (by S G H)
Euclideans Algorithm to reduce fractions
 
Hi my teacher gave us an assignment and I have gotten every thing taken care of except for understanding where to apply the Euclidean Algorithm to reduce my fra...
[no replies]
While(!fin.eof()) infinite loop?
 
Hello everyone. First of all, sorry for another thread on such a common topic, but unfortunately I was not able to fix my program with the solutions found in ot...
[5 replies] Last: ^Thank you, Chervil! Apparently my professor forgot that last id and I... (by cptEczema)
February 2013 Pages: 1... 45678... 67
  Archived months: [jan2013] [mar2013]

This is an archived page. To post a new message, go to the current page.