Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program where the user will input a letter (A-Z) and the program will return the corresponding digit [User enters A so the

image text in transcribed

Write a C program where the user will input a letter (A-Z) and the program will return the corresponding digit [User enters A so the program should output 2]. The user should be able to input lowercase or uppercase. To do this use toupper function to convert the letter.

START READ LETTER LETTER = 'A' 11 LETTER = B' 11 LETTER == TRUE LETTER D' 11 LETTERE lI LETTER = 'F' TRUE FALSE PRINT 2 LETTER = 'G, 11 LETTER H 11 LETTER ='I' TRUE LETTER = 'J' 11 LETTER = K 11 LETTER-L PRINT 3 PRINT 4 PRINT 5 LETTERM II LETTER = 'N, 11 LETTER-O TRUE PRINT 6 FALSE PRINT 7 TRUE LETTER 'Q, 11 LETTER RII LETTER == 'S' PRINT 8 TRUE LETTER = T 11 LETTER-U'II LETTER == 'V PRINT PRINT LETTER TRUE LETTER = 'X' ll LETTER = "Y'll LETTERZ END Page 3 of 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Decisions Based On Data Analytics For Business Excellence

Authors: Bastian Weber

1st Edition

9358681683, 978-9358681680

More Books

Students also viewed these Databases questions