So I have tried everything to figure this code out. I have written the bubble sort code but I do not know how to make it not print grades under 60 percent. I have to somehow only print the grades above 60 but at the end print how many people did not get above 60. this is the code I have for right now if anyone could please help me it would be great.
#include <bits/stdc++.h>
using namespace std;
void bubbleSort(int arr[], int n)
{
if (n <= 1)
return;
for (int i = 0; i < n - 1; i++)
if (arr[i] > arr[i + 1])
swap(arr[i], arr[i + 1]);
bubbleSort(arr, n - 1);
}
void printArray(int arr[], int n)
{
for (int i = 0; i < n; i++)
printf("%d ", arr[i]);
printf("\n");
}
int main()
{
int arr[] = { 64, 34, 25, 12, 22, 11, 90 };
int n = sizeof(arr) / sizeof(arr[0]);
bubbleSort(arr, n);
printf("Sorted array : \n");
printArray(arr, n);
return 0;
}