Thread: errors

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    23

    Question errors

    hey guys i got this program that has many errors and i don't know how to correct them
    Code:
    #include<stdio.h>
    #include<iostream>
    main()
       {
                      int total=0,grade,gradecounter=1,average;
                      while(gradecounter<=10)
                      {
                      cout("enter grade");
                      cin("%d",&grade);
                      total=total+grade
                      gradecounter ++
                      }
                      average+total/10
                      cout("the  class average is");
                      cin("%d",average);
                      system("pause");
                      }

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > cin("%d",&grade);
    Are you a troll?
    errors
    finding difficulties
    Because it's basically the same code as last time with the same errors.


    Or do you just throw bits of syntax at the compiler, find it doesn't compile, then post it here?

    Get a book and READ it.
    There's plenty to choose from in the book thread at the top of the forum.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 10:50 AM
  2. Unknown Errors in simple program
    By neandrake in forum C++ Programming
    Replies: 16
    Last Post: 04-06-2004, 02:57 PM
  3. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  4. Help me with these errors... :-(
    By major_small in forum C++ Programming
    Replies: 6
    Last Post: 09-07-2003, 08:18 PM
  5. errors in class(urgent)
    By ayesha in forum C++ Programming
    Replies: 2
    Last Post: 11-10-2001, 06:51 PM