Assignments » Library Function » Set1 » Solution 5

Write a program which accept a letter and display it in uppercase letter.

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

int main()
{
	char ch;
	cout<<"Enter any character :";
	ch=getchar();
	ch=toupper(ch);
	cout<<ch;
	getch();
	return 0;
}

#include<iostream>
#include<cctype>
using namespace std;

int main()
{
	char ch;
	cout<<"Enter any character :";
	ch=getchar();
	ch=toupper(ch);
	cout<<ch;
	
        return 0;
}

Enter any character : d
D

 

«back