If I have a function like select(int a, int b, int c) how can I use the rand() to select a, b or c and then return that value? ie.. if a=30, b=40 and c=50 how can i use rand() to just pick b and...
Type: Posts; User: wagman
If I have a function like select(int a, int b, int c) how can I use the rand() to select a, b or c and then return that value? ie.. if a=30, b=40 and c=50 how can i use rand() to just pick b and...
sorry about the paste job. all this program does is take input and capitalize it and keep track of the number of characters and letters. Lot of code to do something simple.
if(process(&c,...
how would i go about removing the pointers from this function?
int process(int *p, int *nchars_ptr, int *nletters_ptr)
{
static int cnt = 0, last_char = ' ';
if(isspace(last_char) &&...
nm..got it :)
I don't understand what you mean by
N-i spaces on a line" ?
> for (i = 1;i <= N; i+=2) {
Perhaps
for (i = N;i >= 1; i-=2) {
right, but im stuck on trying to get the triangles to go in the opposite direction so as to complete the diamond. so far i have...
We have to create a diamond that is centered on the screen using this code that creates a triangle. My thought process has been to use 4 right triangles to create the diamond. What im stuck on is...