-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.c
More file actions
22 lines (17 loc) · 554 Bytes
/
Copy pathpage.c
File metadata and controls
22 lines (17 loc) · 554 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<stdio.h>
int main ()
{
int t_pages,min_pages=100,t_s_books,t_l_books,min_s_bkpg=30,min_l_bkpg=50;
printf("Enter Number of Pages:\n");
scanf("%d",&t_pages);
if (t_pages<min_pages)
{
t_pages=min_pages;
printf("Increasing Number of Pages to %d\n",t_pages);
}
t_s_books=t_pages/min_s_bkpg;
t_l_books=t_pages/min_l_bkpg;
printf("Total Number of Small Books (30 Pages Each): %d\n",t_s_books);
printf("Total Number of Large Books (50 Pages Each): %d\n",t_l_books);
return 0;
}