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
Brums [2.3K]
3 years ago
12

2. Write a program that askes the user to enter a positive number not greater than 10.the program then must display the triangle

on the screen using character X.The number entered by the user will be the length of vertical side of the triangle.for example if the user enter 5 the program should display the following; X XX XXX XXXX XXXXX IF THE USER ENTER 8 THEN THE PRGRAM SHOULD DISPLAY THE FOLLOWING; X XX XXX XXXX XXXXX XXXXXX XXXXXXX XXXXXXXX
Computers and Technology
1 answer:
kondaur [170]3 years ago
7 0

Answer:

it will display in this pattern  X XX XXX XXXX XXXXX

#include <iostream>

using namespace std;

int

main ()

{

 int a,i, j=0;

 cout << "enter number for length of triangle";

 cin >> i;

 for ( a = 1; a <= i; a++)

   {

    for (j = 1; j <= a; j++)

    {

      cout << "X";

    }

  cout<<" ";

   }

}

for this

X

XX

XXX

XXXX

XXXXX

#include <iostream>

using namespace std;

int

main ()

{

 int a,i, j=0;

 cout << "enter number for length of triangle";

 cin >> i;

 for ( a = 1; a <= i; a++)

   {

    for (j = 1; j <= a; j++)

    {

      cout << "X";

     

    }

  cout<<endl;

   }

}

You might be interested in
The first daemon loaded on a linux system is _____.
Anni [7]

On a Linux system, the first daemon that is loaded is known as init.

<h3>What is a daemon?</h3>

A daemon can be defined as a program that is designed and developed to run continuously and it's created to handle periodic service requests that are expected to be received on a computer system such as a Linux system.

On a Linux system, init simply refers to the first daemon that is loaded and it runs continuously.

Read more on Linux here: brainly.com/question/25480553

#SPJ12

6 0
2 years ago
When you sit for a typing test, what is the first thought that crosses your mind?
MaRussiya [10]
<span>When you sit for a typing test, what is the first thought that crosses your mind?
posture</span>
8 0
3 years ago
Read 2 more answers
Could someone please paraphrase this for me and rewrite it in your own words??
Nady [450]

I will master the essentials for the Microsoft application Excel. My newly formed skills will be shown through my work shown through Spreadsheets i create and how i utilize mathematical functions in Excel. I am determined to increase my skill level by 90%. I will achieve this goal by the second marking period.

5 0
3 years ago
For whom is beneficial to deduct the amount paid in state income tax from their income for purposes of computing federal income
Musya8 [376]

Obvious advantages stem from being able to deduct the full cost of state and local taxes you have to pay each year. Every deduction from taxable income helps, and these taxes can sometimes be significant. It's something of a double hit if you have to pay taxes to your state and also pay federal tax on taxes you paid to your state.

The state and local tax deduction (SALT) prevents that from happening, at least to some extent.

Rules for the SALT Deduction

All income taxes that are imposed by a state, local, or foreign jurisdiction can be deducted subject to a few rules.

First, you must itemize your deductions on Schedule A to claim them. This means foregoing the standard deduction, which is often more than the total of a taxpayer's itemized deductions for the tax year. Don't be penny wise and pound foolish and give the Internal Revenue Service more money than you have to. Make sure your total itemized deductions exceed the standard deduction for your filing status so itemizing is worth your while. Otherwise, you'll be paying taxes on more income than you have to, which was what you were trying to avoid in the first place.

The tax must be imposed on you personally. You can't claim a deduction for income taxes paid by one of your dependents—and in some cases, even by your spouse. You must have paid them during the tax year for which you're filing.  

Eligible expenses that can be deducted as state and local income taxes include:

Withholding for state and local income taxes as shown on Form W-2 or Form 1099

Estimated tax payments you made during the year

Extension tax payments you made during the year

Payments made during the year for taxes that arose in a previous year

Mandatory contributions to state benefit funds

8 0
3 years ago
From the perspective of the prosecution, the safest legal means of obtaining incriminating documents from a suspect is by: a. Su
never [62]

Answer:

a. Subpoena duces tectum

Explanation:

<u>Options C </u>(an informant steal the documents)<u> and D</u> (discrete copy of the documents) <u>would be considered illegal and/or inadmissible in most places</u>, so you should avoid these.

Options A (subpoena) and B (search warrant) are usually issued by a judge after considerations, so they are both legal ways to obtain something.

In a subpoena duces tecum, the court orders an individual (or a moral person) to produce (usually very specific) documents to court or face penalty.

<u>A search warrant is executed by law enforcement officials who are seeking information to help in their investigation</u>, usually not highly specific (not 'search for a copy of the April 10 minutes of the meeting.').

3 0
4 years ago
Other questions:
  • Alex has started a Google Search campaign designed to promote his online motorcycle accessories store. His store focuses on cust
    6·1 answer
  • âwhat two log files are used by older versions of unix and newer version of linux to store log information
    10·2 answers
  • What is the keyboard shortcut used to paste previously copied text?
    15·2 answers
  • A Java main method uses the parameter (String[ ] variable) so that a user can run the program and supply "command-line" paramete
    5·1 answer
  • Which command backs up the single database called 'websites' to the file 'websites_backup.sql'?
    10·1 answer
  • Which for loop will iterate 100 times? Group of answer choices for (i = 0; i &lt; 99; i++) for (i = 1; i &lt; 99; i++) for (i =
    11·2 answers
  • Who innovated an aeroplane? ​
    5·1 answer
  • Any song recommendations, pls dont say 6ix9ine or lil pump
    5·2 answers
  • Here you guys go im back didnt die or any thing gg for who ever gets this
    11·2 answers
  • Which of the following boxes should replace question mark
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!