Choose the right option in the following program. { float a; int q: printf(\nlnsert number\t"); scanf("%f",&a): q=(int)a; ++q; if((q - a) != 1) printf("-----"); else printf("-

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 7PP
icon
Related questions
Question
Please solve Quickly С++
Choose the right option in the following program.
{
float a;
int q:
printf("\nlnsert number\t");
scanf("%f",&a);
q=(int)a;
++q;
if((q- a) != 1)
printf("-
----");
else
printf(*-
");
а.
check variable positive or negative
b. check variable integer or float
O C.
check variable odd or even
check variable prime or not prime
Transcribed Image Text:Choose the right option in the following program. { float a; int q: printf("\nlnsert number\t"); scanf("%f",&a); q=(int)a; ++q; if((q- a) != 1) printf("- ----"); else printf(*- "); а. check variable positive or negative b. check variable integer or float O C. check variable odd or even check variable prime or not prime
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning