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
olga55 [171]
3 years ago
14

Write a program in c++ to displaypascal’s triangle?

Computers and Technology
1 answer:
Harman [31]3 years ago
7 0

<u> C++ Program to Print Pascal's Triangle</u>

 #include<iostream> //header file

using namespace std;

//driver function  

int main()

{

   int r;/*declaring r for Number of rows*/

   cout << "Enter the number of rows : ";

   cin >> r;

   cout << endl;

 

   for (int a = 0; a < r; a++)

   {

       int value = 1;

       for (int b = 1; b < (r - a); b++) /*Printing the indentation space*/

       {

           cout << "   ";

       }

       for (int c = 0; c <= a; c++) /*Finding value of binomial coefficient*/

       {

           cout << "      " << value;

           value = value * (a - c) / (c + 1);

       }

       cout << endl << endl;

   }

   cout << endl;

   return 0;

}

<u>Output</u>

<u>Enter the number of rows :  5</u>

                 1

              1      1

           1      2      1

        1      3      3      1

     1      4      6      4      1

You might be interested in
What is the maximum number of elements that will be visited by the binary search algorithm when searching a sorted 45-element ar
sergey [27]

The max nukber of elements visited will be 6.

6 0
2 years ago
1. Withdrawal occurs when alcohol is removed from the system after the brain has
Westkost [7]
Experienced it for an extended period of time.
4 0
3 years ago
Respond to the following in three to five sentences. Select the workplace skill, habit, or attitude described in this chapter th
Serjik [45]

A skilled and successful worker is any worker who has special skill, training, knowledge, and (usually acquired) ability in their work. A skilled worker may have attended a college, university or technical school. Or, a skilled worker may have learned their skills on the job. Examples of skilled labor include engineers, software development, paramedics, police officers, soldiers, physicians, crane operators, truck drivers, machinist, drafters, plumbers, craftsmen, cooks and accountants. These workers can be either blue-collar or white-collar workers, with varied levels of training or education.

1. They Think About the Skills They Need for the Next Job

We all (OK, most of us) try to be awesome at the skills in our job descriptions, but the most successful people also focus on what they’ll need to know to succeed in their next jobs. Not sure what skills you should be developing? Check out career expert Laura Katen’s tips for honing in on exactly what to reach for next.

2. They Speak Up in Meetings

Especially if you’re in a large meeting, intimidated by the higher-ups there, or don’t know much about what’s going on, it’s easy to sit tight and listen. But the people who get ahead don’t wait for permission or an invitation to speak—they make sure everyone in the room knows they have something to contribute. Even if you don’t have a suggestion? “Speaking up to advocate for a co-worker’s point of view or asking a well thought-out question can go just as far,” says leadership coach Jo Miller.

3. They Dress for the Job They Want

You’ve heard it a thousand times—but it consistently holds true. People who get ahead at work look to those above them and emulate not only the clothes they wear, but the ways in which they present themselves in the office, interact with others, and approach their work.

4. They Get to Know the Higher-Ups

It’s pretty hard to get promoted if your boss’ boss doesn’t know who you are—so make it a point to get to know the higher-ups in your department. Check out Sara McCord’s tips for talking to your boss’ boss the right way.

5. They Know How to Communicate With Those Higher-Ups

If you’ve ever been in an executive-level meeting, you know that c-suiters communicate a bit differently than the rest of us. So, if you want to make it there someday, it’s key to learn how to talk the talk. Career coach Lea McLeod gives a few tips for getting started.

8 0
3 years ago
Read 2 more answers
Spoken word and written text are different because...<br><br>Plz help
34kurt
I am guessing that spoken words can have emotions in then and can also have an accent while written text has no emotion or an accent.
8 0
3 years ago
To lock down security settings on an individual system on a network, what would you use?
professor190 [17]

Answer:

The answer is "LSS(Local Security Settings)".

Explanation:

The LSS stands for Local Security Settings, it is a set of information about the security of a local computer. LSS allows a feature, that the information on the protection of a local computer is a local safety policy of a device.

  • This option is available on windows.
  • The local security policy information includes the domains, that trust login attempts to be authenticated.

 

8 0
4 years ago
Other questions:
  • What protocol is used to access directory listings within active directory or other directory services?
    13·1 answer
  • 1. Grouping Data in a Pivot Table can help you do what?
    5·1 answer
  • A _____ is a computer virus that replicates and spreads itself, not only from file to file, but from computer to computer via e-
    8·1 answer
  • You are a networking consultant who has been asked to penetration test the network of a small business. you located a target wir
    11·1 answer
  • Answer the following questions: • What is the source of the user’s request? Can a technical solution solve his problem? Perhaps
    10·1 answer
  • What type of software testing is generally used in Software Maintenance?
    11·1 answer
  • When creating envelopes, how will you adjust the layout?
    10·2 answers
  • Exercise 3.6.9: 24 vs. "24"5 points
    7·1 answer
  • Write a program, TwoDimentionalGrid. Ask the user to enter the size of the 2 dimensional array. Here we are not doing any input
    13·1 answer
  • Which generation computer supported GUI operating system?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!