• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Thanks Got help

TheoPetro

Banned
alright this is just a piece of the code. I think the problem is happening when I assing V___ = ____ so VOne=One for example. When I test this and put in random inputs I get an output for V___ of whatever arbitrary number the compiler puts in there. Is this assignment not legal or something?

#include <iostream>
using namespace std;


int main()
{

// Declares a dummy variable that may be altered

double VOne = 0, VTwo = 0, VThree = 0,
VFour = 0, VFive = 0, VSix = 0,
VSeven = 0, VEight = 0, VNine = 0;

// Declares all variables that will not be changed in the program

double One, Two, Three,
Four, Five, Six,
Seven, Eight, Nine;

//Declares the sum variables

double SOne, STwo, SThree, SFour, SFive, SSix, SSeven;

//Input the vlaues of the variables

cin >> One, Two, Three,
Four, Five, Six,
Seven, Eight, Nine;

// Sets the dummy variable to the value of the first input variable.

VOne = One;

// Checks to see if the input stream is done by checking if the input is zero

if (VOne != 0)
{
cout << VOne;
VOne = 0;
}
else
cout << "";

VTwo = (Two);

if (VTwo != 0)
{
cout << VTwo;
VTwo = 0;
}
else
cout << "";
 
Originally posted by: nkgreen
perhaps?

cin >> One>>Two>>Three>>Four>> Five>>Six>>Seven>>Eight>>Nine;

holy ass that was it. I feel kinda dumb right now. Guess thats what I get for doin it at 4am. THanks
 
Originally posted by: TheoPetro
Originally posted by: nkgreen
perhaps?

cin >> One>>Two>>Three>>Four>> Five>>Six>>Seven>>Eight>>Nine;

holy ass that was it. I feel kinda dumb right now. Guess thats what I get for doin it at 4am. THanks

as many times as atot has saved my ass on this kinda stuff......
 
Back
Top