Hi all master,
question:
Write a C program to convert lines of input text to uppercase.
Do not use any standard library functions.
The program prompts the user to enter each line of text and does the conversion when the
text is entered. When an asterisk is entered, the program terminates. Assume that only
lowercase characters and space are entered.
Example execution (input text in italics):
Please enter text line: spiderman
SPIDERMAN
Please enter text line: sports car
SPORTS CAR
Please enter text line:*
HAVE A NICE DAY
Please kindly help me take a look for the program written below:
as i encountered problem with the loop..convert from small letter to upper letter without issue...
Code:
#include <stdio.h>
main()
{
char c, d;
int i;
do{
printf("Please enter text line:");
scanf("%c",&c);
d=(c&0x5f);
printf("%c", d);
}while(c!='*');
printf("Have a good day\n\n");
}