Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

What is the function of #iomanip,why is written here?

0 votes
asked Dec 4, 2017 by anonymous
retagged Dec 4, 2017
//Press a character to know,if it is a number or a letter

using namespace std;
int main()

	char character;
	cout << "Press a symbol: ";
	cin >> character;
	if ((character >='A' && character<='Z') || (character>='a' && character <= 'z'))
		cout << "This is a letter" << endl;
		cout << "This is a number"<<endl;
	return 0;


2 Answers

0 votes
answered Dec 5, 2017 by Akshat Dodwad (230 points)
I think there is no need of iomanip in that set of program
0 votes
answered Jan 4, 2018 by Ali Zahir (140 points)
iomanip is usually used for functions like setw and many others. However in the following programme there is no requirement for the function header file.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.