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
Dimas [21]
3 years ago
7

Assume that the int variables i, j and n have been declared , and n has been initialized . write code that causes a "triangle" o

f asterisks to be output to the screen, i.e., n lines should be printed out, the first consisting of a single asterisk, the second consisting of two asterisks, the third consisting of three, etc. the last line should consist of n asterisks. thus, for example, if n has value 3, the output of your code should be (scroll down if necessary): * ** ***
Computers and Technology
1 answer:
SIZIF [17.4K]3 years ago
5 0

Here you go,

class Program

   {

       static void Main(string[] args)

       {          

          int n,i,j;

          Console.Write("Enter size: ");

          n = Convert.ToInt32(Console.ReadLine());

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

          {

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

              {

                  System.Console.Write("*");

              }

              System.Console.Write("\n");

          }          

           Console.ReadLine();

       }

   }

You might be interested in
Given two 3x3 arrays of integer, x1 and x2, write the code needed to copy every value from x1 to its corresponding element in x2
Reika [66]

Answer:

#include<iostream>

#include<iomanip>

using namespacestd;

int main ()

{

int x1[3][3]={1,2,3,4,5,6,7,8,9};

int x2[3][3];

int i,j;

for(i=0;i<3;i++)

for(j=0;j<3;j++)

x2[i][j] = x1[i][j];

cout<<"copy from x1 to x2 , x2 is :";

for(i=0;i<3;i++)

for(j=0;j<3;j++)

cout<<x2[i][j]<<" ";

cout<<endl;

system("pause");

return 0;

}

/* Sample output

copy from x1 to x2 , x2 is :1 2 3 4 5 6 7 8 9

Press any key to continue . . .

*/

Explanation:

5 0
4 years ago
All ofthe following are correct EXCEPT one option when it comes towriting disappointing news letters. Identify theexception.
Nikolay [14]

Answer: d) Avoid a neutral or buffered opening

Explanation: A newsletter is a piece of a report that is having knowledge about the activities of the business ,organizations,their members and owner etc.When the news letter contains contains a disappointing news it should not not have a buffered or neutral opening .The start of the news letter should not be impartial or prejudiced to make bad opening. Therefore, option(d)is the correct option.

3 0
4 years ago
How do say phone in French?
olga_2 [115]

Answer:

téléphone

Explanation:

thats how you say phone in French also you can go on Google translate or word reference to translate words.

6 0
4 years ago
Read 2 more answers
Which of the following might indicate a source on the internet is NOT reliable?
Evgesh-ka [11]
Were are the choices or do you want us to answer it on our own?
 
7 0
3 years ago
A restaurant bill comes to $28.35. Find the total cost if the tax is 6.25% and a 20% tip is left on the amount before tax.​
Salsk061 [2.6K]

Not sure how this is computers and technology

3 0
3 years ago
Other questions:
  • Data mining must usestatistics to analyze data.<br> True<br> False
    12·1 answer
  • Christine would like to add something to her document that will illustrate the text. She should _____.
    10·2 answers
  • Which group on the Home Ribbon contains the line spacing attribute?
    9·2 answers
  • Dwight <br> d. eisenhower was impressed with germany's network of highways and how it __________.
    15·1 answer
  • Which of the following is a device that plugs in a usb port on the computer or mobile device and contains multiple usb ports?
    9·1 answer
  • 9. Ways in which a person or object is influenced by the surrounding environment​
    8·1 answer
  • Given two variables , first_place_winner and second_place_winner, write some code that swaps their associated values. use any ad
    12·1 answer
  • Which footing supports a long brick or concrete wall<br>​
    14·1 answer
  • While operating a vehicle on any highway of this state, it it illegal to physically hold or support a wireless device with any p
    8·1 answer
  • Which option best describes top-down design?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!