Write a Java program to input length and width and find perimeter and area of rectangle. Logic to find perimeter and area of a rectangle, whose length and width are given. In this example we will learn to write basic logical program in Java. We will learn to find perimeter and area of rectangle.
Length of rectangle = 30
Width of rectangle = 20
Perimeter of rectangle is 100.0 units.
Area of rectangle is 600.0 sq. units.
Continue reading Java program to find perimeter and area of rectangle
Write a Java program to perform all arithmetic operation. How to perform arithmetic operations in Java programming. In this example we will learn to input two integer from user and perform all arithmetic operations.
First number: 15
Second number: 4
Sum : 19
Difference : 11
Product : 60
Quotient : 3
Modulus : 3
Continue reading Java program to perform all arithmetic operations
Write a C program to input any number from user and find cube of the given number using function. How to find cube of a given number using function in C programming. Write a C function to find cube of a given number.
Input any number: 5
Cube of 5 = 125
Continue reading C program to find cube of a number using function