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
How have productivity programs improved the professional lives of people? (check all that apply)
gtnhenbr [62]

Answer:

  • made it easier and less expensive to present information
  • made it easier and faster to communicate with others

Explanation:

productivity programs

productivity programs are designed and use for producing information easily and made it easier and faster to communicate with others

worksheets , charts , graphs , documents etc

MS office , Time management , projects management softwares are the example of  productivity programs

there are alot of tools which are designed to make conversation and communication more easy related to productivity program following are the example of tools

  • Microsoft Teams
  • slack
  • Zoom
  • Office 365
  • Poppulo
  • JIRA Cloud
  • Interact.
3 0
3 years ago
Read 2 more answers
[80 points] Fill in the missing word.
AVprozaik [17]

Answer:

except

you can use github copilot for this  question

8 0
2 years ago
Which statement about routers is !!!FALSE!!!
monitta

Answer:

b. they are located at the intersections of the network of wires and cables that make up the internet.

Explanation:

Given that Router is a computer networking device that operates by transferring data packets between computer networks, while also ensuring traffic organizing tasks on the Internet.

Hence, Routers put packets in the right order after they arrive at their destination by matching the destination IP address of the packet and one of the addresses in the routing table.

Also, Routers check the address on each packet that arrives and decide which way it should go next​ by ensuring the data packets are summarized for the outgoing interface recorded in the table entry.

Therefore, the correct answer is option B

8 0
3 years ago
Exposing employee and customer personal data to an untrusted environment is an example of:
jonny [76]

Answer:

data breach

Explanation:

A data breach is a security event in which a unauthorized person steals, copy, access or transfer personal or confidential data. A data breach is the deliberate or unintentional leak of sensitive data into an distrusted environment. When a perpetrator or cyber criminal effectively invades a data source and steals confidential information, a data breach happens. This can be achieved physically by manipulating a device or network to steal or hack local data. Data breach is being used to target companies mostly by remotely bypassing network security.Data breaches include financial and personal information, trade secrets of companies or intellectual property, files, confidential documents etc.

8 0
3 years ago
A keyboard shortcut to pasting in a document is to key _____.
m_a_m_a [10]
(Ctrl + V) is the shortcut for pasting.

Similarly, (Ctrl + C) is the shortcut for copying.
6 0
3 years ago
Other questions:
  • When typing in a cell, hitting Tab will bring which result?
    12·2 answers
  • Sleeping is an effect of _______ , but agitation may cause a person to wake up
    7·2 answers
  • The user interface design principle that places an emphasis on the intuitive flow of the interface (i.e. left to right and top t
    12·1 answer
  • Create a class called Toddler that inherits from a class called Parent. (Note that Parent has already been defined elsewhere, so
    8·2 answers
  • Write the definition of a method printGrade, which has a char parameter and returns nothing.The method prints on a line by itsel
    6·1 answer
  • Grading on the curve is a method of grading that is based on the belief that letter grades for any given class should be distrib
    8·1 answer
  • Explain agile testing ​
    11·1 answer
  • In the U.S. fuel efficiency of cars is specified in miles per gallon (mpg). In Europe it is often expressed in liters per 100 km
    12·1 answer
  • 20. Modifying a report is easiest from what view. O A. Report O B. Layout O C. Print O D. Design
    14·1 answer
  • What are some ways you can work with templates? Check all that apply.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!