paper of size A0 has dimensions 1189 mmx 841 mm .Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides .Thus paper of size A1 would have dimensions 841 mm X 594 mm .Write a program to calculate the print paper sizes A0,A1,A2,.........A8.

 paper of size A0 has dimensions 1189 mm X 841 mm .Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides .Thus paper of size A1 would have dimensions 841 mm X 594 mm .Write a program to calculate the print paper sizes A0,A1,A2,.........A8

#include<stdio.h>

int main()

{

int i, w=841 ,h=1189 , t ;

for(i=0;i<9;i++)

printf("\nA%d:%d x %d",i,w,h);

t=h;

h=w;

w=t/2;

return 0;

output---  A0 :841 x 1189

                        A1 : 594 x 841

                        A2 : 420 x 594

                       A3 : 297 x 420

                      A4 : 210 x 297

                    A5 : 148 x 210

                    A6 : 105 x 148

                    A7 :  74 x 105

                    A8 : 52 x 74



The length and breadth of a rectangle and radius of a circle are input through the keyboard. write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle  

https://www.blogger.com/u/2/blog/post/edit/5851128460296589847/7280931487310259817

 

Ramesh basic salary is input through the keyword .His dearness allowance is 40% of the basic salary and house rent allowance is 20% of basic salary write a program to calculate his gross salary. 

https://allcodescience.blogspot.com/2021/12/ramesh-basic-salary-is-input-through.html

https://allcodescience.blogspot.com/2021/12/paper-of-size-a0-has-dimensions-1189.html 



Comments

Popular posts from this blog

class with array in c++ (memory allocatin & using array in classes)

constructor with default arguments

constructor overloading in c++ programming