Ok, so basically I want a program which can determine if what the user typed in is a number between 0-9, a letter or a symbol. The commands I have to make it with are:

#include<iostream>
#include<iomanip> 
setw(#) 
setfill('ch') 
bool 
char 
int 
double 
string 
#include<string> 
#include<cmath> 
#include<windows.h> → directiva utilizada para poder el comando de ::Sleep()
::Sleep(#) 
n.length() 


IF/ELSE

(t)x - changes the type of variable
SWITCH

FOR

WHILE

DO/WHILE

This is the only thing i got so far sadly, I have no idea how to continue only using those commands:

#include <iostream>
#include <iomanip>
#include <windows.h>
#include <string>
using namespace std;

int main()
{
    char variable;
    
    cout << "Enter a letter, symbol or number between 0-9: ";
    cin >> variable;
    cout << endl;
    
    if(( variable >= '0') && (variable <= '9'))
    {
         cout << "You have entered: #" << variable << endl << endl;
    }
    
    (  
    
    system("pause");
    return 0;
}

So whats the problem?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.