C++ with user form

Dec 6, 2016 at 4:20am
hello, to all
please help me for this program..


I need to make a program with a form that the user enters a number and it validates if it is even or odd.


In console mode generates it using only an IF ... I need to adapt it to the form by entering it through a text box ..

Excuse my English is not good

thank you.
Dec 6, 2016 at 4:50am
I'm new as well but I'm not exactly sure what it is you're asking. Do you have an idea of where to start? You're going to need 4 functions, 2 of the functions will have reference parameters, 1 of the functions will have a value parameter and three reference parameters. The last function will have three value parameters. Depending on how many numbers you want the user to enter, you need to declare a constant integer


const int N = 25;

hope this helps get you started
Dec 6, 2016 at 9:21am
What do you use for the form?
Normally you need to convert the input from the textbox into an integer and check if it is even or odd and display a messagebox with the result.
Dec 6, 2016 at 4:19pm
That is correct, I have a text box where you must enter a number, and when clicking on the validate button, this message the message to another text box where it should show "the number is even" or "Odd" according to the sea The case

It is my first interaction in a forum and I only start to progress cpp .. this is for my school task.
Dec 6, 2016 at 4:50pm
Can you show us the code you have?
Dec 6, 2016 at 5:28pm
I have a code for console mode.. win 32..


#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
//Programa que determina si un número es par o impar

int num;

cout<<"Escriba un numero: ";
cin>>num;

if(num % 2 == 0){
cout<<"El numero es Par\n";
}

else{
cout<<"El numero es Impar\n";
}
return 0;
}
Dec 6, 2016 at 7:05pm
Do you use Windows and Visual Studio ?
Dec 6, 2016 at 8:53pm
Visual Studio 2012

Dec 6, 2016 at 10:06pm
Here is a simple way to do it. Try if you can run it.
https://www.dropbox.com/sh/1dy2omk8svk43aa/AADH2RKtIaWXACR78r5wfW7fa?dl=0
Topic archived. No new replies allowed.