Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int size=0;
- int*x;
- int max=0;
- int value;
- x=new int [size];
- for(int i=0;i<size;i++){
- x[i]=0;
- }
- cout<<"Enter the grade of student"<<endl;
- do{
- cin>>value;
- if(value>max)
- max=value;
- if(value>=0)
- x[value]++'
- }while(value !=-1);
- for(int j=0;j<=max;j++)
- cout<<j<<x[j]<<endl;
- }
Add Comment
Please, Sign In to add comment