Expand|Select|Wrap|Line Numbers
- #include <stdio.h>
- main()
- {
- int a,b,c,ans;
- printf("\n An airplane travels 280.0m down the runway before taking off.");
- printf("\n If its start from rest, moves with constant acceleration and becomes airborne");
- printf("\n in 8.00s, what is its speed when it takes off?");
- printf("\n a. 70m/s");
- printf("\n b. 80m/s");
- printf("\n c. 90m/s");
- printf("/nEnter Your Answer in SMALL Letter: ");
- scanf("%d", &ans);
- if(ans=='a')
- printf("Your Answer is Correct");
- else
- printf("Your Answer is Wrong");
- printf("\n");
- printf("\nv=2d/t");
- printf("\n2(280.0m)/8.0s");
- printf("\n70m/s");
- printf("\nThe correct answer is a. 70m/s");
- getch();
- }
- The Problem is When i type a it prints the answer is wrong ....what i wanty to make when i type a it will print the answer is correc. can you help me..