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
natali 33 [55]
3 years ago
15

Write the following program in C++ to print:

Computers and Technology
1 answer:
Alenkinab [10]3 years ago
4 0
1.
#include <iostream>#include <string>
using namespace std;
int main(){    string chars; // This is where we will put our @ signs and print them    for(int x=0;x < 5; x++){
        chars = chars + '@'; // This will concatenate an @ sign at the end of the variable        cout << chars << "\n";    }}

2.
#include <iostream>#include <string>
using namespace std;
int main(){    string name; // Our variable to store the name    cout << "What is your name? \n"; // Asks the user for their name    cin >> name;    cout << "\nWell, hello " << name << "!";}

3.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n"; // Asks for a number    cin >> number;    cout << "You entered " << number << "%!";}

4.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n";    cin >> number;
    int check = number % 2; // The modulo operator (the percent sign) gets the remainder of the quotient    if (check == 0) {        cout << number << " is even!"; // If the remainder is 0 then it prints out "x is even"    } else {        cout << number << " is odd!"; // If the remainder is not 0 then it prints out "x is odd"    }}

5.
#include <iostream>#include <string>
using namespace std;
int main(){    float r; // Our variable    cout << "Enter a radius\n";    cin >> r;    if (r < 0){        cout << "Lol. No."; // If the radius is less than zero print out that message    }    float circumference=2*3.14*r;    float area=r*r*3.14;    cout << "\n\n Circumference of circle: " << circumference;    cout << "\n Area of circle: " << area;}
You might be interested in
What is the name of a robot astronaut created by NASA
dsp73

<span>
The name of the robot astronaut created by NASA is Robonaut 2.</span>

<span /><span>This robot has arm, legs, a head and a torso. It even has fingers so that it is able to use the same tools that is used by human astronauts. </span>

<span> Hope this helps. :)</span>

4 0
2 years ago
Read 2 more answers
Weak Induction
slega [8]

Answer:

Following are the answer to this question:

Explanation:

In option 1:

The value of n is= 7, which is (base case)

\to 3^7

when n=k for the true condition:

\to 3^k

when n=k+1 it tests the value:

\to 3^{(k+1)}= 3^k,3\\\to < (k!) 3 \ substituting \ equation \\\to

since k>6  hence the value is KH>3 hence proved.

In option 2:

when:

for n=1:(base case)

\log(1!)

0<=0 \\ condition is true

when the above statement holds value n=1

when n=k

\log(k!)

when n=k+1

\log(k+1)!=\log(k!)+\log(k+1)\\

             

\because k \log k      [\therefore KH>K \Rightarrow  \log(KH>\loK)]

In option 3:

when n=1:

A_1 \cup B=A_1 \cup B\\\\

when n=k

\to (A_1\cap A_2 \cap.....A_k) \cup B\\=(A_1\cup B) \cap(A_2\cup B_2)....(A_k \capB).....(a)\\\to n= k+1\\ \to (A_1\cap A_2 \cap.....A_{kH}) \cup B= (A_1\cup B)\\\\\to  [(A_1\cap A_2 \cap.....A_{k}) \cup B]\cap (A_{KH}\cup B)\\\\\to  [(A_1\cup B) \cap (A_2 \cup B) \cap (A_3\cup B).....(A_k\cup B)\cap (A_{k+1} \cup B)\\\\  \ \ \ \ \ \ substituting \ equation \ a \\\\

hence n=k+1 is true.

7 0
2 years ago
A document with a(n) ____ guarantees that the document was indeed sent by a specific individual and that it hasn t been tampered
BARSIC [14]
The answer is A) digital signature
8 0
3 years ago
________ are used in input, processing, and output operations that can help create more efficient programs as the data can be pr
lapo4ka [179]
Functional requirements <span>are used in input, processing, and output operations that can help create more efficient programs as the data can be processed many times without having to be input again.
</span>The functional requirements define function/s of a system or its component. It <span>describes what a software system should do.</span>
8 0
3 years ago
Which tool allows multiple users to dynamically update a document at the same time? Question 3 options: Google Docs OneDrive Exc
GenaCL600 [577]

Answer:

Excel

Explanation:

7 0
2 years ago
Other questions:
  • Because log-on procedures may be cumbersome and tedious, users often store log-on sequences in their personal computers and invo
    6·1 answer
  • If you are viewing a webpage with customized or regenerated content, such as updated stock quotes, what type of webpage are you
    14·1 answer
  • ________ gives its approval to U.S. e-commerce websites that follow strict privacy standards, such as explaining to visitors how
    6·1 answer
  • Yahoo and Google are examples of __________ used to perform Internet research.
    14·2 answers
  • In which circumstances would the view side by side feature be useful or helpful.
    15·2 answers
  • What are the names of the four major varnas in the caste system?​
    9·2 answers
  • What is one major difference between the roles of film directors and theater directors? A. A theater director is involved in sel
    14·1 answer
  • Which is the correct expansion of the term Internet?
    15·2 answers
  • After turning on your computer ,it prompts you to type a password to continue the boot process. However ,you forgot the password
    10·1 answer
  • Most effective way of closing email is<br>​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!