Ask Question
23 November, 02:59

Write the C+ + statement to declare and initialize a 5-element, one-dimensional integer array named grades. Use the following grades to initialize the array: 100 90 80 78 98. Then write the C+ + code to display the contents of the array on the screen using a 'for" loop.

+2
Answers (1)
  1. 23 November, 03:11
    0
    int grades[5] = { 100, 90, 80, 78, 98 };

    for (int i=0; i<5; i++)

    {

    cout << grades[i];

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write the C+ + statement to declare and initialize a 5-element, one-dimensional integer array named grades. Use the following grades to ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers