please help me.... i need some help on how to get the grades of this program and also can u please correct it... cause i think something is not right...

#include<iostream.h>

int A[5];
int ctr;

main()
{
   ctr=5;
   while(ctr<5);
   {
      cin>>A[ctr];
      ctr=ctr +1;
   }
   cout<<A[5];

   ctr=5;
   do
   {
      cout<<A[ctr];
      ctr=ctr +1;
   }
    while(ctr<=4);

    for(ctr=0; ctr<=4; ctr++)
        cout<<A[ctr];
}

can u please make it right and with a value of grades....

I believe this version of your program will at least compile:

#include<iostream>
using namespace std;

int A[5];
int ctr = 0;

int main()
{
     ctr = 5;

     while(ctr < 5);
     {
          cin >> A[ctr];
          ctr++;
     }

     cout << A[5];

     ctr = 5;

     do
     {
          cout << A[ctr];
          ctr++;

     }while(ctr <= 4);

     for(ctr = 0; ctr <= 4 ; ctr++)
     {
          cout<<A[ctr];
     }

return 0;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.