import java.util.Scanner;
public class polygon {
/** Main Method */
public static void main(String[] args) {
Scanner input = new Scanner(System.in); // Create a Scanner
// Prompt the user to enter the number of sides
// and the side of a regular polygon
System.out.print("Enter the number of sides: ");
int n = input.nextInt();
System.out.print("Enter the side: ");
double side = input.nextDouble();
// Display the area of the regular polygon
System.out.println("The area of the polygon is " + area(n, side));
}
/** Method area computes and returns the area of a regular polygon */
public static double area(int n, double side) {
return (n * Math.pow(side, 2) / (4 * Math.tan(Math.PI / n)));
}
}
Answer:b)via radio signals
Explanation: Machine-to-machine technology is the technology that helps in sharing of the real time information of the device that have embedded sensor.They can work without the help of the manual factors.
The data is shared through the help of the radio signals in the devices like turbines vending machines etc for the tracking purpose and managing.
Thus the other options are incorrect because short distance is a disttance, cloud services are for the collection of services and databases contains the data. So, the correct option is option (b).
Answer:
Class are the collection of variable and member function.
Class are the blueprint of an object.
Explanation:
Following are the points regarding class in c++
1.In C++ class is an user defined datatype..
2.Classes are the collection of variable and function in c++.
3.To access the property of class we can create object of that class
4.We can use following syntax to declared any class in c++
class classname
{
accessmodifier:
//statement and function
};
main()
{
classname objectname;
}
implementation of class in c++
#include<iostream>
class test // class declaration
{
public: // access modifier
void fun3() // Method definition
{
cout<<" hello :";
}
};
void main() // main function
{
test ob;// creating object
ob.fun3(); // calling function
}
In this program we declared a class "test " in class test. We giving public access modifier .The public access modifier define that variable and function are accessible outside the class and in main method we create the object ob which call the function fun3().
Output:hello :
Answer:
Data is raw or unorganized facts
Explanation:
If something outputs something, it means it brings out something
It’s says the same thing to me too!