Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java help

Name: Anonymous 2011-10-17 0:03

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: Anonymous 2011-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);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List