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
klasskru [66]
3 years ago
5

. Write a swift programming code to perform following tasks a) Declare a variable that stores the age of a person b) Declare a c

onstant that stores the earth gravity 9.8
Computers and Technology
1 answer:
Law Incorporation [45]3 years ago
5 0

Answer:

Here we use the shift programming  code

(a)var age1: Int=24

(b)let ear_grav:Float=9.8

Explanation:

(a) To declared any variable in swift we follow following syntax

Syntax:var variableName = <initial value>

var age1: Int=24

Here age1 is a variable that stores the age of a person

to print this use we print command in swift

print(age1)

(b)To declared the constant in swift we follow following syntax

Syntax: let constantName = <initial value>

let ear_grav:Float=9.8

Here ear_grav is a constant that stores the earth gravity 9.8

to print this use we print command in swift

print(ear_grav)

You might be interested in
Given four files named asiasales2009.txt, europesales2009.txt, africasales2009.txt, latinamericasales2009.txt, define four ofstr
Lynna [10]

Answer:

ofstream asia("asiasales2009.txt");  //It is used to open asiasales2009.txt files with the asia objects.

ofstream europe("europesales2009.txt");  //It is used to open  europesales2009.txt files with the europe objects.

ofstream africa("africasales2009.txt"); //It is used to open africasales2009.txt files with the africa objects.

ofstream latin("latinamericasales2009.txt");//It is used to open latinamericasales2009.txt files with the latin objects.

Explanation:

  • The above code is written in the c++ language which is used to open the specified files with the specified objects by the help of ofstream class as described in the question-statements.
  • The ofstream is used to open the file in the c++ programing language, so when a user wants to use the ofstream to open the file in written mode, then he needs to follow the below syntax--

              ofstream object("file_name_with_extension");

4 0
3 years ago
How can I order the prices negatively affect other producers of goods and services​
Nikolay [14]
Scarcity of availability causes producers to either charge
higher prices or to produce more goods and services (like energy
production, cars, paper, etc.)
7 0
3 years ago
Use this illustration to answer the question.
Mademuasel [1]

Answer:

very high voltage hope this helps

Explanation:

4 0
3 years ago
______________ CRM supports traditional transactional processing for day-to-day front-office operations or systems that deal dir
Elina [12.6K]

Answer:

Explanation:

the answer is yes

3 0
3 years ago
Which relationship is possible when two tables share the same primary key?
jek_recluse [69]

The answer to this problem is A, one-to-one.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is the software called that allows the user to create, access, and manage a database? question 8 options:
    10·1 answer
  • You are in charge of designing a menu tree for navigating 1,250 books in a digital library. Present an argument of whether the m
    12·1 answer
  • A palindrome number is a number that remains the same when its digits are reversed. Like 16461, for example, is a palindrome num
    13·1 answer
  • Rick needs to find the lowest number in a set of numbers that includes decimals. Which statistical function in a spreadsheet wil
    9·2 answers
  • To whom the script most important
    13·1 answer
  • This describes what is charted. It can be placed above or below the chart.
    12·1 answer
  • Which of these is NOT an example of lifelong learning?
    6·1 answer
  • WHAT DOES THE SCRATCH CODE BELOW DO?
    6·1 answer
  • In the computer science industry, the process of finding and removing errors from computer hardware or software is known as
    7·1 answer
  • Common names for computer-based information systems are transaction processing, management information, ________, and executive
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!