C program to cut paper parallel to short length.
CODE:-
#include <stdio.h>
int main()
{
int l=1189;
int b=841;
printf("The dimension of A0 paper= %d mm x %d mm\n",l,b);
for(int i=1;i<=8;i++)
{
if(l>b)
{
l=l/2;
b=b;
printf("The dimension of A%d paper= %d mm x %d mm\n",i,l,b);
}
else
{
l=l;
b=b/2;
printf("The dimension of A%d paper= %d mm x %d mm\n",i,l,b);
}
}
return 0;
}
Comments
Post a Comment