Maruf_Hasan

master

Oct 22nd, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int main()
  7. {
  8. int n;
  9. cout<<"Enter number of student"<<endl;
  10. cin>>n;
  11. int test[125],attendence[125],finalxm[125];
  12. for(int i=0;i<n;i++)
  13. {
  14. cout<<"Enter the marks of "<<i<<" th student"<<endl;
  15. cin>>test[i]>>attendence[i]>>finalxm[i];
  16. }
  17. int result[125];
  18. for(int i=0;i<n;i++)
  19. {
  20. result[i]=(test[i]+attendence[i]+finalxm[i]);
  21. }
  22. for(int i=0;i<n;i++)
  23. {
  24. if(result[i]>=80)
  25. {
  26. cout<<i+1<<"th student got A+"<<endl;
  27. }
  28. else if(result[i]>=75)
  29. {
  30. cout<<i+1<<"th student got A"<<endl;
  31. }
  32. else if(result[i]>=70)
  33. {
  34. cout<<i+1<<"th student got A-"<<endl;
  35. }
  36. else if(result[i]>=65)
  37. {
  38. cout<<i+1<<"th student got B+"<<endl;
  39. }
  40. else if(result[i]>=60)
  41. {
  42. cout<<i+1<<"th student got B"<<endl;
  43. }
  44. else
  45. {
  46. cout<<i+1<<"th student Failed"<<endl;
  47. }
  48.  
  49. }
  50.  
  51. return 0;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment