You are viewing a single comment's thread. Return to all comments →
//using namspace std; int main() { int V,n; //cin>>v; scanf("%d",&V); //cin>>n; scanf("%d",&n); int a[n]; int i,j; for(i=0;i>n;i++) {
//cin>>a[i]; scanf("%d",&a[i]); } int temp; for( i=0;i<n;i++) { for(j=0;j<n-i-1;j++) { if(a[j]>a[j+1]) { temp =a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } for(i=0;i<n;i++) { if( V==a[i]) {//cout<<i; printf("%d",i);} } return(0);
}
WHAT IS WRONG WITH THIS
Seems like cookies are disabled on this browser, please enable them to open this website
Intro to Tutorial Challenges
You are viewing a single comment's thread. Return to all comments →
//using namspace std; int main() { int V,n; //cin>>v; scanf("%d",&V); //cin>>n; scanf("%d",&n); int a[n]; int i,j; for(i=0;i>n;i++) {
}
WHAT IS WRONG WITH THIS