# Convert the square inch to square yard

A square inch is a unit of area measurement in the Imperial system and is defined as the area of a square with sides that are one inch in length. A square yard is also a unit of area measurement in the Imperial system, but it is larger than a square inch. One square yard is equivalent to an area that measures three feet by three feet or 36 inches by 36 inches.

To convert square inches to square yards, you need to divide the number of square inches by the number of square inches in one square yard, which is 1,296 (36 inches x 36 inches). So, the formula for converting square inches to square yards is:

square yards = square inches / 1,296

For example, if you have an area of 5,184 square inches, you can convert it to square yards as follows:

square yards = 5,184 / 1,296 square yards = 4

Therefore, 5,184 square inches is equivalent to 4 square yards.

## Program Solution

``````//C Program
//Convert the square inch to square yard
#include <stdio.h>
//Find the square inch of given square yard
void square_inch_to_square_yard(double square_inch)
{
// Calculate square yard
// Formula : (Square inch / 1296)
double square_yard = (square_inch / 1296);
printf("Square inch : %lf, Square yard : %lf\n", square_inch, square_yard);
}
int main()
{
//Simple test
square_inch_to_square_yard(1);
square_inch_to_square_yard(2021);
square_inch_to_square_yard(1500.6);
return 0;
}``````

#### Output

``````Square inch : 1.000000, Square yard : 0.000772
Square inch : 2021.000000, Square yard : 1.559414
Square inch : 1500.600000, Square yard : 1.157870``````
``````/*
Java program
Convert the square inch to square yard
*/
class MyMath
{
//Find the square inch of given square yard
public void square_inch_to_square_yard(double square_inch)
{
// Calculate square yard
// Formula : (Square inch / 1296)
double square_yard = (square_inch / 1296);
System.out.print("Square inch : " + square_inch + " , Square yard : " + square_yard + "\n");
}
public static void main(String[] args)
{
MyMath obj = new MyMath();
//Simple test
obj.square_inch_to_square_yard(1);
obj.square_inch_to_square_yard(2021);
obj.square_inch_to_square_yard(1500.6);
}
}``````

#### Output

``````Square inch : 1.0 , Square yard : 7.716049382716049E-4
Square inch : 2021.0 , Square yard : 1.5594135802469136
Square inch : 1500.6 , Square yard : 1.1578703703703703``````
``````/*
C++ program
Convert the square inch to square yard
*/
#include<iostream>

using namespace std;
class MyMath
{
public:
//Find the square inch of given square yard
void square_inch_to_square_yard(double square_inch)
{
// Calculate square yard
// Formula : (Square inch / 1296)
double square_yard = (square_inch / 1296);
cout << "Square inch : " << square_inch << " , Square yard : " << square_yard << "\n";
}
};
int main()
{
MyMath obj;
//Simple test
obj.square_inch_to_square_yard(1);
obj.square_inch_to_square_yard(2021);
obj.square_inch_to_square_yard(1500.6);
return 0;
}``````

#### Output

``````Square inch : 1 , Square yard : 0.000771605
Square inch : 2021 , Square yard : 1.55941
Square inch : 1500.6 , Square yard : 1.15787``````
``````/*
C# program
Convert the square inch to square yard
*/
using System;
class MyMath
{
//Find the square inch of given square yard
public void square_inch_to_square_yard(double square_inch)
{
// Calculate square yard
// Formula : (Square inch / 1296)
double square_yard = (square_inch / 1296);
Console.Write("Square inch : " + square_inch + " , Square yard : " + square_yard + "\n");
}
public static void Main(String[] args)
{
MyMath obj = new MyMath();
//Simple test
obj.square_inch_to_square_yard(1);
obj.square_inch_to_square_yard(2021);
obj.square_inch_to_square_yard(1500.6);
}
}``````

#### Output

``````Square inch : 1 , Square yard : 0.000771604938271605
Square inch : 2021 , Square yard : 1.55941358024691
Square inch : 1500.6 , Square yard : 1.15787037037037``````
``````<?php
/*
Php program
Convert the square inch to square yard
*/
class MyMath
{
//Find the square inch of given square yard
public	function square_inch_to_square_yard(\$square_inch)
{
// Calculate square yard
// Formula : (Square inch / 1296)
\$square_yard = (\$square_inch / 1296);
echo "Square inch : ". \$square_inch ." , Square yard : ". \$square_yard ."\n";
}
}

function main()
{
\$obj = new MyMath();
//Simple test
\$obj->square_inch_to_square_yard(1);
\$obj->square_inch_to_square_yard(2021);
\$obj->square_inch_to_square_yard(1500.6);
}
main();``````

#### Output

``````Square inch : 1 , Square yard : 0.0007716049382716
Square inch : 2021 , Square yard : 1.5594135802469
Square inch : 1500.6 , Square yard : 1.1578703703704``````
``````/*
Node Js program
Convert the square inch to square yard
*/
class MyMath
{
//Find the square inch of given square yard
square_inch_to_square_yard(square_inch)
{
// Calculate square yard
// Formula : (Square inch / 1296)
var square_yard = (square_inch / 1296);
process.stdout.write("Square inch : " + square_inch + " , Square yard : " + square_yard + "\n");
}
}

function main()
{
var obj = new MyMath();
//Simple test
obj.square_inch_to_square_yard(1);
obj.square_inch_to_square_yard(2021);
obj.square_inch_to_square_yard(1500.6);
}
main();``````

#### Output

``````Square inch : 1 , Square yard : 0.0007716049382716049
Square inch : 2021 , Square yard : 1.5594135802469136
Square inch : 1500.6 , Square yard : 1.1578703703703703``````
``````# Python 3 program
# Convert the square inch to square yard

class MyMath :
# Find the square inch of given square yard
def square_inch_to_square_yard(self, square_inch) :
#  Calculate square yard
#  Formula : (Square inch / 1296)
square_yard = (square_inch / 1296)
print("Square inch : ", square_inch ," , Square yard : ", square_yard ,"\n", end = "")

def main() :
obj = MyMath()
# Simple test
obj.square_inch_to_square_yard(1)
obj.square_inch_to_square_yard(2021)
obj.square_inch_to_square_yard(1500.6)

if __name__ == "__main__": main()``````

#### Output

``````Square inch :  1  , Square yard :  0.0007716049382716049
Square inch :  2021  , Square yard :  1.5594135802469136
Square inch :  1500.6  , Square yard :  1.1578703703703703``````
``````# Ruby program
# Convert the square inch to square yard

class MyMath

# Find the square inch of given square yard
def square_inch_to_square_yard(square_inch)

#  Calculate square yard
#  Formula : (Square inch / 1296)
square_yard = (square_inch / 1296.0)
print("Square inch : ", square_inch ," , Square yard : ", square_yard ,"\n")
end
end
def main()

obj = MyMath.new()
# Simple test
obj.square_inch_to_square_yard(1)
obj.square_inch_to_square_yard(2021)
obj.square_inch_to_square_yard(1500.6)
end
main()``````

#### Output

``````Square inch : 1 , Square yard : 0.0007716049382716049
Square inch : 2021 , Square yard : 1.5594135802469136
Square inch : 1500.6 , Square yard : 1.1578703703703703
``````
``````/*
Scala program
Convert the square inch to square yard
*/
class MyMath
{
//Find the square inch of given square yard
def square_inch_to_square_yard(square_inch: Double): Unit = {
// Calculate square yard
// Formula : (Square inch / 1296)
var square_yard: Double = (square_inch / 1296);
print("Square inch : " + square_inch + " , Square yard : " + square_yard + "\n");
}
}
object Main
{
def main(args: Array[String]): Unit = {
var obj: MyMath = new MyMath();
//Simple test
obj.square_inch_to_square_yard(1);
obj.square_inch_to_square_yard(2021);
obj.square_inch_to_square_yard(1500.6);
}
}``````

#### Output

``````Square inch : 1.0 , Square yard : 7.716049382716049E-4
Square inch : 2021.0 , Square yard : 1.5594135802469136
Square inch : 1500.6 , Square yard : 1.1578703703703703``````
``````/*
Swift program
Convert the square inch to square yard
*/
class MyMath
{
//Find the square inch of given square yard
func square_inch_to_square_yard(_ square_inch: Double)
{
// Calculate square yard
// Formula : (Square inch / 1296)
let square_yard: Double = (square_inch / 1296);
print("Square inch : ", square_inch ," , Square yard : ", square_yard ,"\n", terminator: "");
}
}
func main()
{
let obj: MyMath = MyMath();
//Simple test
obj.square_inch_to_square_yard(1);
obj.square_inch_to_square_yard(2021);
obj.square_inch_to_square_yard(1500.6);
}
main();``````

#### Output

``````Square inch :  1.0  , Square yard :  0.000771604938271605
Square inch :  2021.0  , Square yard :  1.55941358024691
Square inch :  1500.6  , Square yard :  1.15787037037037``````

## Comment

Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.