Hey guys I need help with my java coding. I'm required to write a code that takes 3 numbers (user input) and sort them from smallest to largest. Can someone show me how to code this?
Name:
Anonymous2011-10-17 1:41
#include<algorithm>
#include<iostream>
int main(){
int a,b,c;
int arr[3];
cin >> a >> b >> c;
arr[0]=a;
arr[1]=b;
arr[2]=c;
sort(arr,arr+3);
}