Sign in to follow this  
Cornel Iulian

[C] Transforma o litera mica in majuscula

1 post in this topic

Cerinta:  Creati un program C care transforma o litera mica in majuscula.

// char c este litera mica, transform-o in majuscula
#include <stdio.h>
#include <conio.h>

int main()
	char c;
	printf("Introduceti un caracter: ");
			printf("Majuscula literei '%c' este '%c'",c,c-'a'+'A');
			printf("Nu ati introdus o litera mica.");
		printf("Nu ati introdus un caracter.");
	return 0;


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this