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
Suppose company A wants to develop a program that duplicates the functionality of a programm by company B. Describe how company
kompoz [17]
The design of the software is covered by copy right unless it is open sourced or is a very common interface. They would need to come up with their own design and way of solving the problem to have a solution that was not copyrighted.
5 0
3 years ago
Create the SQL statements for displaying the results for each of the following scenarios in the Academic Database. Save these st
Whitepunk [10]

Answer:

CREATE FUNCTION exam_eligible_students

   RETURN NUMBER AS

   num_students NUMBER(15);

BEGIN

   SELECT COUNT(STUDENT_ID)

   INTO num_students

   FROM STUDENT_ATTENDANCE

   WHERE ELIGIBILITY_FOR_EXAMS = 'Y';

   

   RETURN (num_students);

END;

Explanation:

exam_eligible_students is a made of name for the FUNCTION to be called.

num_students is a made up name for the RETURN to be called. The RETURN name is referenced in the INTO statement and as the name of the the return in the RETURN line in ().

4 0
3 years ago
Which is the correct expansion of the term Internet? 
kirill115 [55]

Answer:

international network

Explanation:

8 0
3 years ago
Read 2 more answers
Which two standards below represent newer versions of stp??
valina [46]
Standard Tree Protocol (STP) is a networking protocol that was made by Radia Perlman. It makes a single path over a network, averting any loops from happening. Even if there are multiple paths to the same destinations. It has two never versions which is 802.1s and 802.1w.
8 0
3 years ago
Which is the full form of COPA​
Radda [10]

Answer:

<u>COPA full form or meaning is Computer Operator and Programming Assistant.</u>

5 0
2 years ago
Read 2 more answers
Other questions:
  • 1.
    13·1 answer
  • A type TW cable containing two No. 12 copper conductors has a maximum overcurrent protection of
    7·2 answers
  • A compound document contains _______ from different applications.
    12·2 answers
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • Unix is called a(n) ___________ operating system because it can run on a desktop pc or a server. operating systems installed on
    7·1 answer
  • Please help me
    10·1 answer
  • To open a Google Doc in another software application, the user must first download it. True or false?
    12·2 answers
  • They are correct? thank you!
    6·2 answers
  • Create a vector of structures experiments that stores information on subjects used in an experiment. Each struct has four fields
    12·1 answer
  • How is scale depicted on a flat video screen?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!