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

#include<iostream>
#include<iomanip>
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;
	else
		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.
...