Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - [N]auTiCa

Pages: [1] 2 3 4 5 6 7
1
Trouble Shooting / Re: Need help with a C++ program...
« on: February 04, 2009, 12:07:11 PM »
Thanks QwazyWabbit on the arrayless version, I never thought of using arguments this way.

2
Trouble Shooting / Re: Need help with a C++ program...
« on: January 31, 2009, 11:14:49 PM »
Although the first couple responses didn't do exactly what I was attempting, it did help understand what I was trying to accomplish.

As for the other responses... thanks QwazyWabbit, if you actually coded all that yourself, I'm quite impressed you took the time
to help me that much, I appreciate it. As a side note, I actually needed 7 inputs on one line, asked once to enter only 7 digits.
You said if that were the case I wouldn't need an array, but I don't see how I could accomplish this without an array?

As for quadz.. wtf is ruby? lol

/sarcasm


3
Trouble Shooting / Re: Need help with a C++ program...
« on: January 28, 2009, 05:14:41 PM »
thanks reaper and krenz.. that actually helped a lot.

as for this q2 noobie flamethread starter k_ ...if you have nothing useful to say, don't respond to my threads, so
just move along, cuz from here on out you will just be ignored.

had I just asked someone to do my hw, I would have posted a problem and asked for a solution, not provided
any code.

thanks again to the old q2'ers willing to help the infamous [N]auTiCa  :bigshades:

4
Trouble Shooting / Need help with a C++ program...
« on: January 28, 2009, 02:03:57 PM »
Hey hows everyone been..?

Haven't been around the Q2 community for awhile and what better way
to come back then to ask for help  ;D

Anyway, I'm having a bit of trouble with the following code.

You are to input 7 numbers then print, however if you input anything other than a number
higher than 7 it says it's to high. I need user input to type in any 7 numbers from 0-9
then print all 7 on one line. If they input more than 7, it's to give an error then exit.

Heres what I have thus far.

Code: [Select]
#include <iostream.h>

int main()
{
   const int x = 7;
   int count[x];
   int num;
   for (int num=0; num<7; num++)
   {
                     cout << "Enter exactly 7 numbers" << endl;
                     cin>>count[num];

                     if(count[num]>x)
                     cout<<"Too many numbers entered "<<endl;
                     else
                     cout << "\nThats it."<<endl;
                     cout<<"\ninputs: " << count[num] <<"\n";
                   
                   
                         
                   
        system("PAUSE");
    return(0);
}
}


Any help would be greatly appreciated.

p.s. hey console.. ltns :)


5
Trouble Shooting / Re: SQL help needed.
« on: October 11, 2007, 09:52:18 PM »
Well I shouldn't say that.. I do have access to sql plus and the schools server.. but was having trouble getting it to work, but am figuring it out.

Will also give those clients you mentioned a try also, thanks.. completely forgot mysql.

6
Trouble Shooting / Re: SQL help needed.
« on: October 11, 2007, 07:00:43 PM »
Do you think this would work? I can't test any of these statements as I don't have access to a database, but the logic seems right

Code: [Select]
Select LNAME, COUNT(LNAME)
 FROM BORROWED GROUP BY LNAME, DEPT
 HAVING COUNT(LNAME)=(SELECT MAX(A.CNT)
 FROM (SELECT COUNT(LNAME) AS CNT FROM STUDENT
 GROUP BY (LNAME, DEPT)) AS A);

7
Trouble Shooting / Re: SQL help needed.
« on: October 11, 2007, 06:43:09 PM »
Well its actually trying to find the highest borrowing record for a students last name for the year 2000-2007

my tables are below with some sample data.

Code: [Select]
CREATE TABLE STUDENT
(STUID INTEGER PRIMARY KEY,
FNAME CHAR(20),
LNAME CHAR(20),
GRADE CHAR(2),
DEPT CHAR(25),
DOB CHAR(10),
FINE REAL);

-- Book table
CREATE TABLE BOOK
(ISBN INTEGER PRIMARY KEY,
TITLE CHAR(30),
AUTHOR CHAR(20),
EDITION CHAR(5),
BOOKYR CHAR(4));

-- Borrowed table
CREATE TABLE BORROWED
(STUID INTEGER,
ISBN INTEGER,
BORROWDATE CHAR(10),
DUE CHAR(10)
PRIMARY KEY(STUID, ISBN, BORROWDATE));

-- Sample data for STUDENT
INSERT INTO STUDENT VALUES ('4567', 'Michael', 'Doe', 'C', 'English', '02/15/1982', '20.00')

-- Sample data for BORROWED
INSERT INTO BORROWED VALUES ('4567', '3456345798', '10/05/2007', '11/05/2007')


What do you think?

8
Trouble Shooting / Re: SQL help needed.
« on: October 11, 2007, 05:28:32 PM »
Another question, say you want to find the person who has rented the most movies from the year 2000 to 2007.

Do you perform a count first, then compare it and display results?

Stuck on this one for the last half hour.. any info would be appreciated.

9
Trouble Shooting / Re: SQL help needed.
« on: October 11, 2007, 04:52:12 PM »
I tried googlin' it with no luck..

thanks console.

10
Trouble Shooting / Re: SQL help needed.
« on: October 11, 2007, 04:04:50 PM »
Anyone know the cmd to find out how many records there are of a specific person.

Say you want to find out how many students have the first name mike.

11
Trouble Shooting / Re: SQL help needed.
« on: October 09, 2007, 09:49:04 AM »
Thanks reaper.. I was looking for the INSERT cmd, wasn't sure how to input generic data to run a query.

I'm working on it now and will show my results in a little bit.

12
Trouble Shooting / Re: SQL help needed.
« on: October 09, 2007, 09:15:35 AM »
OK, I have created these tables

Code: [Select]
CREATE TABLE Student
(studentid INT,
firstname CHAR(20),
lastname CHAR(20),
grade CHAR(1),
dept CHAR(25),
DOB DATE,
fine REAL,
PRIMARY KEY(firstname);

CREATE TABLE Book
(isbn INT,
title CHAR(20),
author CHAR(20),
edition INT,
bookyear DATE)

CREATE TABLE Borrowed
(studentid INT,
isbn INT,
borrowdate DATE,
due DATE)

Then I have to create 10 tuples with data for each. After that I am to retrieve data.. but will worry about that later, for now I want to know how to make up data for the tables, any ideas?

13
Trouble Shooting / Re: SQL help needed.
« on: October 08, 2007, 11:32:00 PM »
anyone know how to use isql*plus?

specifically, how to enter in data and execute it to display results. I can create a table, but try and execute it and get nothing, unless I'm doing it wrong, been following the tutorial at http://www.oracle.com/technology/obe/obe9ir2/obe-mng/isqlplus/isqlplus.htm

console (of all trades).. do you know any sql?

14
Trouble Shooting / SQL help needed.
« on: October 08, 2007, 09:34:52 PM »
Heyy.. naut back here asking for assistance again. It's been almost a yr since I last asked for help lol.

Anways, anyone here good at SQL?

I need some help with a program and have to get this done in a couple days, so if anyone is up for helping please let me know asap and I will post what I'm having trouble with.

15
Quake / Re: Fatal1ty - Article on Jonathon Wendel
« on: April 27, 2007, 12:00:22 PM »
I highly doubt the 12-16 hour a day practicing and even so.. one can go door to door selling cookies for 16 hrs a day! be in shape and make more than he has made doing this as a career... I feel bad for these kinda guys who spend so much on a computer playing games (addicted).. whatever.

Pages: [1] 2 3 4 5 6 7