Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for LiquidScorpio81

I'm trying to use for loops to output: 1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 public class Fit1 { public static void main(String args[]) { int side1,side2, side3; for (side1 = 1; side1 <= 3; side1++) { for (side2 …

Member Avatar for stevelg
0
91
Member Avatar for LiquidScorpio81
Member Avatar for LiquidScorpio81

#include<iostream> using namespace std; void BubbleSort(int ar[10], int n, int & compare_costs, int & swap_costs) { int t; int swaps=-1; while(swaps) { swaps++; compare_costs++; for(int i=0; i<n-1; i++) if(ar > ar[i+1]) { t=ar; ar=ar[i+1]; ar[i+1]=t; swap_costs=swap_costs+5; } } } int main() { int n, compare_costs, swap_costs; int ar[10]; int *bs …

Member Avatar for VernonDozier
0
985
Member Avatar for LiquidScorpio81

I'm trying to generate 100 random numbers from 1-100 into an array. I can generate the 100 random numbers but don't know how to put it into an array. #include<iostream> using namespace std; int main() { int ar; for(int i=0; i<100; i++) { ar =(rand()%100); cout<<ar<<" "; } }

Member Avatar for Salem
0
85