Write a C Programm..
we press 'a' , it shows the albhabetical number is 1, if we
press 'g' it shows the answer 7.. any can help me
Answer Posted / shams
#include <iostream>
using namespace std;
int main()
{
char n;
cout<<"Enter a character";
cin>>n;
int no=int(n)>=97?int(n)-96:int(n)-64;
cout<<no;
return 0;
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain what is a program flowchart and explain how does it help in writing a program?
How many identifiers are there in c?
What are c header files?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
largest Of three Number using without if condition?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is #line?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
How #define works?
When c language was developed?
What is this infamous null pointer, anyway?
What is the symbol indicated the c-preprocessor?
List a few unconditional control statement in c.
What is the difference between a free-standing and a hosted environment?