Hi this is a C program. I need you to convert it to a C++ program. MAke sure its working thank you.here is the program:
#include void main(){ int n; printf("Enter the size of input: "); scanf("%d",&n); int arr[100]; printf("Enter the numbers: "); int i; for(i=0;i<> { scanf("%d",&arr[i]); } int j,temp; for(i=0;i<> { for(j=i+1;j<> { if(arr[j]>arr[j+1]) { temp=arr[j]; arr[j]=arr[j+1]; arr[j+1]=temp; } } } printf("The three largest numbers are: %d %d %d",arr[n-3],arr[n-2],arr[n-1]);}
}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here