User Profile

Collapse

Profile Sidebar

Collapse
gator6688
gator6688
Last Activity: May 12 '08, 12:37 AM
Joined: Sep 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How do I fix it? Do I make i=0?
    See more | Go to post

    Leave a comment:


  • Help with Error Exception in thread "main" java.lang.NullPointerException

    Code:
    import java.text.DecimalFormat;
    import javax.swing.JOptionPane;
    
    public class PayrollSystemTest {
    
       public static void main( String[] args )
       {
          String workerType;
          String first;
          String last;
          String ssn;
          int month;
          int day;
          int year;
          float salary;
          float rate;
          float hourlyWage;
    ...
    See more | Go to post

  • gator6688
    started a topic Help with formula.
    in C

    Help with formula.

    address of the first record in the array + (account number - 1000) * sizeof(int).

    I am supposed to read this file into 4 separate arrays. And, be able to request a user-entered account number and display the corresponding name and account balance. This is all I come up with so far, but not really sure how to use that formula.

    here is my list:
    1000 Betsy Ross 87.32
    1001 Fred Flintstone 879.35
    1002...
    See more | Go to post

  • gator6688
    started a topic Help saving additional data to file?
    in C

    Help saving additional data to file?

    I need to be able to save my additional data to my .dat file. The additional data is not part of the vector though. It is data I made after the vector. I have to save the finalGrade and letter grade to my file.Also, how can I save my letter grade to my file when I didn't actually name it that?

    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <fstream>
    #include <string>
    #include
    ...
    See more | Go to post

  • I have tried moving it all kinds of places but it does not work anywhere I put it.
    See more | Go to post

    Leave a comment:


  • How can I get my finalGrade formula to work for all students?

    I am trying to get my finalGrade formula to work for all of the students. I have moved it around several places but it doesn't seem to work anywhere. I will post where I have it now and maybe somebody could give me a push in the right direction.

    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <fstream>
    #include <string>
    #include <cstdlib>
    #include <iomanip>
    ...
    See more | Go to post

  • gator6688
    started a topic My program compiles but doesn't output right.
    in C

    My program compiles but doesn't output right.

    I have to write a program that allows the user to enter the information for up to 20 students. The info then has to be displayed and written to a file. After I enter the first students info and hit enter it goes nuts. Does anyone see something that I have done wrong?

    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <fstream>
    #include <string>
    #include <cstdlib>
    #include
    ...
    See more | Go to post

  • gator6688
    replied to 2 Questions about my array.
    in C
    Well, I came up with this and it works.

    Code:
    #include "stdafx.h"
    #include <iostream>
    using namespace std;
    
    int main()
    {
    	const int People = 10;
    	int i, PeopleTypes[People], numberOfOnes=0, numberOfTwos=0, numberOfThrees=0, numberOfFours=0;
    
    cout << "Enter 1 for Infant, 2 for Child, 3 for Teenager, or 4 for Adult\n";
    cout << "for
    ...
    See more | Go to post

    Leave a comment:


  • gator6688
    replied to 2 Questions about my array.
    in C
    I need the program to add up the 1's, 2's, 3's, and 4's as they are entered and then output how many of each were entered.
    See more | Go to post

    Leave a comment:


  • gator6688
    replied to 2 Questions about my array.
    in C
    maybe something like this?

    Code:
    switch (PeopleTypes)
       {
       case 1:
    	   cout << "The total number of Infants is " << numberOfOnes;
    	   break;
       case 2:
    	   cout << "The total number of Children is " << numberOfTwos;
    	   break;
       case 3:
    	   cout << "The total number of Teenagers is " << numberOfThrees;
    ...
    See more | Go to post

    Leave a comment:


  • gator6688
    started a topic 2 Questions about my array.
    in C

    2 Questions about my array.

    I have to make a program that enters either a 1, 2, 3, or 4 for 50 people attending a function. Then I have to be able to count how many of each 1's, 2's ,3's, and 4's there were. My 2 questions are:

    1.) Would this program be better as a while loop so it is continous or a for loop?

    2.) How could I start code to count each individual category?



    Code:
    #include "stdafx.h"
    using namespace
    ...
    See more | Go to post

  • gator6688
    started a topic Help counting individual inputs in an array.
    in C

    Help counting individual inputs in an array.

    I wrote this program and so far so good but now I have to be able to count how many 1's, 2's, 3's, and 4's were entered. I am at a complete loss of where to begin. Could someone help me get started?

    Code:
    #include "stdafx.h"
    using namespace std;
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	const int People = 5;
    	int i, PeopleTypes[People], count=0;
    
    cout << "Enter 1
    ...
    See more | Go to post

  • gator6688
    started a topic Help counting with an array.
    in C

    Help counting with an array.

    I am trying to figure out when I enter the data instead of asking for person #1: everytime I can get it to ask person #1: then on the next line person #2: and so on. Here is my code so far:

    Code:
    #include "stdafx.h"
    using namespace std;
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	const int People = 5;
    	int i, PeopleTypes[People];
    
    cout << "Enter 1 for Infant, 2 for
    ...
    See more | Go to post

  • gator6688
    replied to Help with Error's c2446 & c2440.
    in C
    Well I put it into a for loop and now i'm not getting any errors but i'm not getting any output for that loop either. I am trying to output the list of grades and have an * beside any grade below the average grade. I put grade as an int because it wouldn't have any decimals and I changed sum to an int because it wouldn't have any decimals either. Here is my loop:

    Code:
    for (i=0; grade[i] < Avg; i++)
    	{	
    		cout << "*"
    ...
    See more | Go to post

    Leave a comment:


  • gator6688
    replied to Help with Error's c2446 & c2440.
    in C
    I forgot to tell what the errors were. They are cannot convert double to int.
    See more | Go to post

    Leave a comment:


  • gator6688
    started a topic Help with Error's c2446 & c2440.
    in C

    Help with Error's c2446 & c2440.

    I am trying to set this program up so that any grade that is below the average will have an * placed next to it. When I compile I keep getting these two errors. Anybody know what I am doing wrong?


    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <iomanip>
    using namespace std;
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	const int MAXGRADES = 5;
    ...
    See more | Go to post

  • gator6688
    replied to Need help writing a function.
    in C
    How can I get the data I enter to be sent to the check? Also, how come when it asks me for the first and last name and amount it all goes on the same line?

    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <string>
    using namespace std;
    
    string todaysDate;
    string firstName;
    string lastName;
    double amount;
    
    void enterData();
    void printCheck();
    ...
    See more | Go to post

    Leave a comment:


  • gator6688
    replied to Need help writing a function.
    in C
    Somebody please put me out of my misery and write this for me. Please.
    See more | Go to post

    Leave a comment:


  • gator6688
    replied to Need help writing a function.
    in C
    Plus, all the tutorials I read is for a function adding two intergers a+b which is easy. I have to be able to input the info into one function and have it passed on to another and have it displayed in the check. Yes for most of you it would probably be easy but I have only been learning C++ for 5 weeks and most of this stuff is still difficult for me.
    See more | Go to post

    Leave a comment:


  • gator6688
    replied to Need help writing a function.
    in C
    How long would it take you to write this program?
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...