109 Topics

Member Avatar for
Member Avatar for trd360

My assignment is to randomly generate a password based on the selection chosen by the user. So far, my code is unfinished but that's because I've run into a problem. For the second selection(Lowercase and uppercase letters). My password will display lowercase and uppercase letters but it won't be enough …

Member Avatar for subramanya.vl
0
164
Member Avatar for gg652

I need a program that will ask 16 true or false questions. The game needs to keep going until the user either answers 8 questions correctly or 8 inncorectly. A message should inform the user wether they won or lost and ask if they would like to play again, at …

Member Avatar for rubberman
0
275
Member Avatar for acerious

// #include <iostream> #include <iomanip> using namespace std; int main() { float assign1, assign2, assign3, assign4, examScore; float assignWeight; cout << " Welcome to UOW Score System" << endl; cout << " " << endl; cout << "Enter the scores for Assignment 1 / 2 / 3 / 4" << …

Member Avatar for Gonbe
0
153
Member Avatar for mike.severini.3

I have an assignment where I have to produce a rectangle or square based off of input values. For example; the user inputs height = 3 and width = 3 *** *** *** But I also need to make a hollowed out box, so it's like this height = 4 …

Member Avatar for mike.severini.3
0
140
Member Avatar for andyy121

if($username&&$password) { $connect = mysql_connect("localhost","root","") or ("Couldn't connect!"); mysql_select_db("phplogin") or die ("Couldn't find db"); $query = mysql_query("Select * FROM users WHERE username='$username'"); $numrow= mysql_num_rows($query); i just wont to know the IF statement when it stars what is his function in the code.

Member Avatar for diafol
0
131
Member Avatar for natehome

hi, i'm working with php short hand for the first time and i'm trying to edit this code: <?=($c->is_admin == 'Yes')?'<a href="msg_update.php" input type="submit" class="button" value="protected page">Update Home Page Message</a>' : ' <p> This is not the page you were looking for. </p> ' ?> i want to do something …

Member Avatar for cereal
0
152
Member Avatar for coolikedat99

I am trying to make a program that generates a random number and asks the user to input the random number generated by the computer. Anyone know how to do this? This is my program: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int one; time_t …

Member Avatar for RainbowMatrix
0
291
Member Avatar for Djmann1013

I am having trouble with this code block: if($row['banned'] == 1) { header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } elseif ($row['banned'] == 2){ header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } Ive also tried this: if($row['banned'] == 1 or $row['banned']== 2) { header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } But none of this works... I am trying …

Member Avatar for Djmann1013
0
153
Member Avatar for 111100/11000

#include <iostream> #include <cmath> #include <string> #include <cstdlib> #include <cstring> using namespace std; int main() { char chouseing_alphabet[27]={'a', 'b', 'c', '\0'}; string abc[27]; cout << "This program encrypts messages using Ceaser Cipher\n"; cout << "NOTE:capital letters are not allowed in this program\n"; cout << "\n---------------------------------------------------------"; cout << "\n---------------------------------------------------------"; cout << …

Member Avatar for Ancient Dragon
0
221
Member Avatar for Lostelf

Hi everyone I'm having a problem with this program giving me the wrong output. The question is • void getScore() should ask the user for a test score, store it in a reference parameter variable. This function should be called by the main once for of the six scores to …

Member Avatar for rithish
0
378
Member Avatar for da(code)da

my code is messing up. help: if (mysql_query("CREATE DATABASE $dbname",$con)) { echo "Database Created<br>"; $dbase = $_POST["CallSign"]."char"; mysql_select_db($dbase, $con); $sql = "SELECT * FROM $dbase"; $result = mysql_query($sql); if ($result) { echo "CallSign Accepted<br>"; mysql_select_db("my_db", $con); $sql="INSERT INTO users ( CallSign, Email, FirstName, MiddleName, LastName, Gender, BirthMonth, BirthDay, BirthYear, Location, …

Member Avatar for da(code)da
0
180
Member Avatar for da(code)da

Im not seeing it but its not working here is the code: mysql_select_db("my_db", $con); $sql = "CREATE TABLE stream ( waveID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(gameID), userID int, wave varchar(25), waveTime TIMESTAMP DEFAULT NOW() )"; // Execute query if(!mysql_query($sql)) { echo "Couldn't do it"; } else { echo "alright"; …

Member Avatar for da(code)da
0
169
Member Avatar for stupid guy

hi all! lame programmer here again.Please explain this thing..seems like it has truth table and stuf.anding oring etc..plz explain how this will execute.need simple explanation so i wont forget throughout my life..:D if (!(mysql_query($sql,$con)) || !(mysql_query($sql_pin,$con))) { if(mysql_errno()==1062) { $error_flag=1; echo mysql_error(); echo "error no:".mysql_errno(); die("error:".mysql_errno()); } $error_flag=1; } else …

Member Avatar for soapyillusion
0
260
Member Avatar for HTMLperson5

Whats wrong with this code? I have not any errors from ie. <html> <script type="text/javascript"> var a = 1; var b = 2; if (a < b) { document.write("CONDITION TRUE :D") } else { document.write("CONDITION IS FALSE D:") </script> So?

Member Avatar for lambing
0
160
Member Avatar for bilfus01

I am hoping this is an easy question. I am not well versed in Java, I am a ITSM admin, but the ITSM product we use comes with Tomcat as it's web server. I am trying to find out if there is a simple way to set index file (welcome …

Member Avatar for Imby
0
152
Member Avatar for hwoarang69

so the code is pretty simple. it just loops and if statements. first i have a main. i took the headers and prototypes out to make it smaller. In main all iam doing is asking user to enter command and call one funtion. // main.c int main(int argc, char *argv[]) …

Member Avatar for WaltP
0
174
Member Avatar for aitm04

hi i am using fedora 14 and 16....while executing the parallel programs in c i am getting segmentation fault(core dumped) when i give the array size more than 100000 ....

Member Avatar for JasonHippy
0
87
Member Avatar for hwoarang69

i need help with if statement. for some reason its not working right and i dont know why. i never goesinside 2nd if statement. i i want to go inside this if statement - if left_var value is "2x" //for loop iam start with x. b = 'x' and b-1 …

Member Avatar for scudzilla
0
112
Member Avatar for hwoarang69

lets say i have a i have a char array char left_var[] //-33x-4x+x this char left_var array has the value of "-33x- 4x+ x" and result should be "-33-4+1" and store in another array called in another word iam trying to get rid of x's and if there is only …

Member Avatar for hwoarang69
0
144
Member Avatar for pattilupwned

Hello, I am writing code that mimics the game Mastermind. The computer randomly comes up with a code based on the "colors" RGBOY. The user has ten guesses to guess what the code is. Right now my code displays the secret code at the beginning just so I can test …

Member Avatar for histrungalot
0
178
Member Avatar for dakerao

Hello all I have a bunch of aggregate elements within my array. This array is for vertex positions in OpenGL. and I need to make a switch without having to bind more data to OpenGL. To do this I must put an if statement within the array or a booleon …

Member Avatar for MandrewP
0
175
Member Avatar for 3nrichedd

hello everyone, I am recieving this compiler error stating that `else if(input%100 || input%10 == rndNum%100 || rndNum%10)` this line ^ gives me the error error: bad operand types for binary operator '||' was hoping someone could explain this error to me if possible, also any advice would be greatly …

Member Avatar for picogenkaku
0
168
Member Avatar for ibthevivin

So the program I'm writing should count how many of each individual vowel is in the program and then print that. I'm basically stuck with while and conditional statements. I think my if statement is where I've gone wrong. I'm not sure how to have it read the letter properly …

Member Avatar for SirMG
0
185
Member Avatar for FraidaL

Is it possible to loop an if-else statement? How would such a thing be coded. Basically, this code allows the user to enter a value for a month. If it's not from 0-12 it asks the user to enter a new value. How could I get that to go through …

Member Avatar for Tygawr
0
391
Member Avatar for arathy nair

Hi all, I have a situation where am using String conditions(say if(name.equalsIgnoreCase(Arathy)). I want to replace this if-else loop with Switch cases..What way i can do to accomplish this?

Member Avatar for ~s.o.s~
0
158
Member Avatar for themenucha

Hi! I'm making a chess program, that need to move pieces on the chess board, get an input,check if the move is valid and print the output. The compiler finds some errors that i don't understand...I need some help with the pieces functions. Plz help me fix them!!! my attempts …

Member Avatar for DJSAN10
0
531
Member Avatar for jakizak

Does anyone see an issue with the following IF statement... I sure can't yet it doesn't work! VARIABLES: $CHECK = A returned value from the database either "y" or "n", the value is returned successfully so I know that is not the issue here. There is no error message returned, …

Member Avatar for almostbob
0
176
Member Avatar for pwolf

the objective is as follows: Write a function splitWord(word, numOfChar) that takes in a word and a number as arguments. The function will split the word into smaller segments with each segment containing the number of letter specified in the numOfChar argument. These segments are stored and returned in a …

Member Avatar for pwolf
0
891
Member Avatar for ben25x

This code prints coordinates for a square that another program uses. For space's sake I have cut out all the other program's code, but I believe it is a simple syntax mistake with my if() statements. I have followed the rules and looked just about everywhere and followed all of …

Member Avatar for Adak
0
171
Member Avatar for Daman824

I've been trying to make a cash register program and right now this is my draft. For the program, the prices need to add up to a total which than will be calculated with HST and discount amounts. The discount needs to be the lowest number price entered from all …

Member Avatar for Daman824
0
144

The End.