User Profile

Collapse

Profile Sidebar

Collapse
complexc
complexc
Last Activity: May 8 '07, 09:44 PM
Joined: Apr 16 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • complexc
    replied to help using EOF to stop the loop
    in C
    ok here is a revised version, please tell me what you think
    Code:
    cout << "Enter any number to continue: <EOF> to stop.\n";
    	while (cin >> x)
    		{
    		read_scores (test1, test2, test3);
    		grade = calc_grade (test1, test1, test3);
    		display_grade (grade, test1, test2, test3, i);
    		i++;
    		}
    	return 0;
    btw, why do i get no error messages when i compile the whole...
    See more | Go to post

    Leave a comment:


  • complexc
    started a topic help using EOF to stop the loop
    in C

    help using EOF to stop the loop

    I am having trouble figuring out how to stop from the loop using EOF. I need to use a while loop in main and use EOF to stop it. Can anyone guide me.
    This is part of the program I was asked to do:
    Code:
    cout << "Type EOF if you wish to end\n";
    	while (counter != 'EOF') 
    	{
    		read_scores (test1, test2, test3);
    		grade = calc_grade (test1, test1, test3);
    		display_grade (grade, test1, test2,
    ...
    See more | Go to post
No activity results to display
Show More
Working...