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

Pages: 1-

Please help..

Name: Anonymous 2013-11-19 1:40

// ConsoleApplication6.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include <stdlib.h>
#include <stdio.h>


int valid(int);

int main(void){
int i, num;
int input[1][4];
//int guess[1][4];
char test;

printf("To begin, you need to enter four numbers between 1 and 4 below.\n");

// User Input and checking
do{
for (i=0; i<4; i++){
printf("Please input an integer between 1 and 4: ");
//scanf_s("%d", input[1][i]);
input[1][i] = getchar();
}
}
while(test != valid(num));

printf("\n%d", input[1][4]);

return 0;

}

int valid(int input[1][i]){
if (input[1][i]<1 && input[1][i]>4)
return 1;
else
return 0;
}

Name: Anonymous 2013-11-19 1:42

Did you have a question nigger?

Name: Anonymous 2013-11-19 1:56

apparently I have to declare the identifier i called in the function valid. I'm not sure how to do this without losing the value from the main. First semester with C++, not to good at coding yet

Name: Anonymous 2013-11-19 8:46

This is one of the most shitty codes I ever saw.

I just gogooled stdafx... What the fuck is this?

Mulitdimensional arrays : I hope you are circumcised.

num is not even initialised.

int input[1][4];
[...]
input[1][i] = getchar();


for (i=0; i<4; i++){
printf("Please input an integer between 1 and 4: ");

If you had taken math you should know that the maximum interger for i<4


"First semester with C++" using printf and getchar like a script kiddie.

printf("\n%d", input[1][4]);//Hahahahaha I should have chosen English major, DISREGARD THAT I SUCK COCKS

das ist die große Scheiße!!

"apparently I have to declare the identifier i called in the function valid. I'm not sure how to do this without losing the value from the main"

At first I was thinking you were just a noob learning and in search for a honest answer but >>3 is just gold.

Wow

Anyways, here is the code cleaned.



#include <stdio.h>
#include <iostream>

using namespace std;

int main(){

int kasher;
cout << "Please Yehudim chose an number betwene eins and vier" << endl;
cin >> kasher;

if (kasher < 5 && kasher > 0){cout << "Welcome to the Gohihm פלס" << endl;}
else {cout << "Time to do English major";}

return 0;
}


Also your return was exteriox of the main פין.

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