Answer to Question #236960 in C for shivam

Question #236960

Write a c program to search page 11 in a book where you don’t visit every page from 1 to 50. You open any random page in the book and check its page number. If the current page number is greater than 11, then 11 is on the left side of the current page.

1
Expert's answer
2021-09-14T01:56:09-0400
#include<stdio.h>
int main(){
	int n;
	printf("Enter a random page number\n");
	scanf("%d", &n);
	if(n>11){
		printf("Page 11 is on the left side of the current page");
	}
	else{
		printf("Page 11 is on the right side of the current page");
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS