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
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
Should a function contain a return statement if it does not return a value?
What is pre-emptive data structure and explain it with example?
What is #include conio h?
What is void main ()?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
provide an example of the Group by clause, when would you use this clause
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
How does free() know explain how much memory to release?
When do we get logical errors?
how can f be used for both float and double arguments in printf? Are not they different types?
What’s the special use of UNIONS?
What are the 32 keywords in c?
Can you assign a different address to an array tag?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..