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 / nitin garg

#include <stdio.h>
#include <conio.h>


int main()
{


char a;
scanf("%c",&a);
if(a>='A' && a<='Z')
a=a+32;
printf("%d",a-96);
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between static and dynamic modeling.

613


c program to compute AREA under integral

1804


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

2570


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

596


Why ca not I do something like this?

583






What does dm mean sexually?

806


What is the difference between class and object in c?

578


How can I get random integers in a certain range?

609


What functions are in conio h?

652


What are the application of c?

639


What is a far pointer in c?

592


Do array subscripts always start with zero?

776


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

1056


How main function is called in c?

622


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

651