Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~6K People Reached
Favorite Forums
Favorite Tags
c++ x 21
Member Avatar for myrongainz

i have done coding for the board but now I'm stuck on getting randomizing ship placement for player1 and player2 So far for ship placement all i have is the function prototype. [CODE]#include <stdio.h> #include <stdlib.h> #include <time.h> int placeship( int x, int z[ ][ 10 ] ); // function[/CODE] …

Member Avatar for Lerner
0
2K
Member Avatar for myrongainz

btw this is a part of a battleship code i want to know what the integers a,b,c,d,e,f... do I know this has something to do with placing ships randomly but it is a little complexed for me. I'd appreciate it if someone took their time to explain it [CODE]int placeship( …

Member Avatar for zeroliken
0
199
Member Avatar for myrongainz

btw this is a part of a battleship code i want to know what the integers a,b,c,d,e,f... do I know this has something to do with placing ships randomly but it is a little complexed for me. I'd appreciate it if someone took their time to explain it [CODE]int placeship( …

Member Avatar for WaltP
0
364
Member Avatar for myrongainz

[CODE]string rev; for(int i =1; i<=(int)user.length();i+=2) { rev = user.length[i+1]; rev = user.length[i]; } [/CODE] this is a part of my code where "user" is the user inputted text. I'm trying to get the output to do this. input - square output - er au qs I've been stuck on …

Member Avatar for myrongainz
0
130
Member Avatar for myrongainz

I'm trying to reverse a string in pairs Example: input - heaven output - ne va eh My code seems to be right until the last for loop... That's where I need help Here's my code: [CODE]#include <iostream> #include <string> using namespace std; string revString(string user); int main() { string …

Member Avatar for stereomatching
0
361
Member Avatar for myrongainz

I can reverse it but can't figure out how to reverse it in pairs. example - hello output - ol le h [CODE]#include <iostream> #include <string> using namespace std; int main() { string user; cout<<"Enter a random text"<<endl; getline(cin,user); for(int i = user.length();i>=0;i--) { cout<<user[i]; } return 0; } [/CODE]

Member Avatar for mrnutty
0
162
Member Avatar for myrongainz

I know this program only takes few lines. I don't now how to out put the text to print every other letter for example: shsofwbanrqeiyzobu output: h o w a r e y o u [CODE]int main() {string k; cout << "eneter a text" << endl; getline(cin,k); for(int index =1; …

Member Avatar for myrongainz
0
601
Member Avatar for myrongainz

My teacher showed me something like this with functions but I don't quiet get it. Since, I can't ask him right now...I came here for help. I'm suppose to write a function to display days in a month. This is my first time using functions so all the help I …

Member Avatar for myrongainz
0
161
Member Avatar for myrongainz

Hello, basically I'm trying to write a program where you ask the user to input 2 positive number. Then the program will print the lower of the two numbers to the higher of the 2 numbers and then higher of the 2 numbers to the lower of the 2 numbers. …

Member Avatar for sundip
0
415
Member Avatar for myrongainz

Hello, basically I'm trying to write a program where you ask the user to input 2 positive number. Then the program will print the lower of the two numbers to the higher of the 2 numbers and then higher of the 2 numbers to the lower of the 2 numbers. …

Member Avatar for sfuo
0
2K