1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kitty [74]
2 years ago
14

Difference between if then and if then else statement ​

Computers and Technology
1 answer:
Troyanec [42]2 years ago
6 0

Answer:

<em>if..then statement is used to make a decision when there is only two options. </em>

<em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em> </em><em>&</em>

<em>you have to write a program that have to choose from three options then we use if..then..else statement.</em>

<h3>I HOPE THIS WILL HELP YOU IF NOT THEN SORRY</h3>

HAVE A GREAT DAY :)

You might be interested in
Suppose you define a java class as follows: public class test { } in order to compile this program, the source code should be st
likoan [24]
Test.java

The classname and the filename need to match (case sensitive).
5 0
3 years ago
Write a C++ program that computes the area and perimeter of aspecified shape
leonid [27]

<u>C++ program that computes the area and perimeter of a specified shape</u>

#include <iostream>

#include <cmath>

using namespace std;

void rectangle() //Defining function for rectangle

{ int h,w;

cout << "Enter height: ";

//taking input

cin >> h;

cout << "Enter width: ";

cin >> w;

cout << "The perimeter of the rectangle is " <<2*h+ 2*w << " and the area is " <<h*w << endl;  //printing output

}

void triangle()  //Defining function for triangle

{ int s1,s2,s3,h,w;

cout << "Side 1: ";  //Taking input

cin >> s1;

cout << "Side 2: ";

cin >> s2;

cout << "Side 3: ";

cin >> s3;

cout << "Enter the height: ";

cin >> h;

cout << "Enter the base length: ";

cin >> w;

cout << "The perimeter of the triangle is " <<s1+s2+s3 << " and the area is " <<(.5)*w*h << endl; //printing output

}

void circle()//Defining Function for the circle

{

const double p=3.14;

int w;

cout << "Enter the radius: "; //Taking input

cin >> w;

cout << "The perimeter of the circle is " << p*2*w << " and the area is " << p*w*w<< endl;  //printing output

}

int main()  //driver function

{

int s;

cout << "Enter the shape (1 for rectangle,2 for triangle, 3 for circle): ";

//Asking user for the shape

cin >> s;

switch(s)  //checking which shape it chooses

{

case 1:

rectangle();  //If user type 1 ,then calling rectangle function

break;

case 2:

triangle();   //If user type 2 ,then calling triangle function

break;

case 3:

circle();  //If user type 3,then calling circle function

break;

default:

cout <<"Enter valid choice for shape";  //If user type other than 1,2,3

}

return 0;  

}

<u>Output</u>

Enter the shape (1 for rectangle,2 for triangle, 3 for circle): 1

Enter height:2

Enter width: 3

The perimeter of the rectangle is 10 and the area is 6

<u />

4 0
3 years ago
What is the purpose of the domain name system
SpyIntel [72]

Answer:

The Domain Name System (DNS) is a central part of the internet, providing a way to match names (a website you're seeking) to numbers (the address for the website). Anything connected to the internet - laptops, tablets, mobile phones, websites - has an Internet Protocol (IP) address made up of numbers.

Explanation:

6 0
3 years ago
Read 2 more answers
A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.Which
vichka [17]

Answer:

The answer woul be B

Explanation:

Cloud computing, often called simply "the cloud," is the delivery of on-demand computing services, all from applications to data centers, through the Internet on a pay-per-use basis.

Flexible resources: scale quickly and easily, horizontally and vertically, to meet demand

Measured service so you only pay for what you use

Self-service: all the IT resources you need with self-service access

Software as a service (SaaS)

* Cloud-based applications, or software as a service, run on distant computers "in the cloud" that are owned by others and operated by others, and that connect to users' computers through the Internet and, Usually a web browser.

A private cloud is an infrastructure that is operated exclusively by a single organization, either managed internally or by a third party, and is hosted internally or externally. Private clouds can take advantage of cloud efficiencies, while offering greater control of resources and avoiding multi-tenancy.

Key aspects of the private cloud

A self-service interface that controls services, allowing IT staff to provide, allocate and distribute IT resources on demand.

Highly automated management of resource pools for everything from computing capacity to storage, analytics and middleware

Sophisticated security and control projected for specific company requirements

* Public clouds belong and are managed by companies that offer quick access to computer resources accessible through a public network. With public cloud services, users do not need to acquire hardware, software or support infrastructure, as they belong and are managed by providers.

6 0
3 years ago
Read 2 more answers
Do yall play games..............................................................................................................
polet [3.4K]

Answer:

hell yeah boi. ...................................

7 0
3 years ago
Read 2 more answers
Other questions:
  • You have a folder on your Windows desktop system that you would like to share with members of your development team. Users need
    13·1 answer
  • Mengapakah wanita hamil memerlukan jumlah nutrien yang lebih banyak berbanding wanita tidak hamil.
    10·1 answer
  • 802.11ac provides an advantage over 802.11n by incorporating increased channel bonding capabilities. What size bonded channels d
    10·1 answer
  • Select the correct answer.
    9·2 answers
  • Eric would like to have a callout text box that makes it look as if the character in an image is speaking. Which object should h
    12·2 answers
  • What is the name of the first practical asymmetric cryptosystem that was created?
    15·1 answer
  • Answer for 3.4.8 rectangle code HS
    9·1 answer
  • _________________ uses soap or detergent to physically remove germs, dirt, and impurities from surfaces or objects.
    13·1 answer
  • What are the supercomputers and where are they used? ​
    9·1 answer
  • 1.Microsoft Word is a/an ........​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!