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
mojhsa [17]
2 years ago
12

This is for C++: Using a nested for loop output the following pattern to the screen:

Computers and Technology
1 answer:
olga55 [171]2 years ago
3 0

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int r=26,x,y;//defining integer variable  

char c;//defining a character variable

for(x= 1; y<= r; x++)//using for loop for count value

{

for(y= 1; y<= x; y++)//using for loop to convert value in triangle  

{

c=(char)(y+64);//convert value into character  

cout << c;//print character value

}

cout << "\n";//use print method for line break

}

return 0;

}

Output:

Please find the attachment file.

Explanation:

In this code, three integer variable "x,y, and r", and one character variable "c" is declared, that is used in the nested for loop,  in the first for loop it counts the character value and in the next for loop, it converts the value into a triangle and uses the char variable to print its character value.

You might be interested in
Security is essential to keep in mind when doing business online. Select three tips for keeping customers' private
zlopas [31]
Make sure credit card processing uses a digital certificate to verify the processing site
5 0
2 years ago
3.6 code practice (edhesive)
Pie

largest = int(input("Enter a number: "))

print("Largest: {}".format(largest))

i = 0

while i < 5:

   num = int(input("Enter a number: "))

   if num > largest:

       largest = num

   print("Largest: {}".format(largest))

   i += 1

I hope this helps!

4 0
3 years ago
Squares. Write a program class named SquareDisplay that asks the user for a positive integer no greater than 15. The program sho
Nana76 [90]

Answer:

import java.util.Scanner;

class SquareDisplay {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   System.out.print("Enter an integer in the range of 1-15: ");

   int num = scan.nextInt();

   if ((num > 0) && (num <= 15)) {

     String s = "X".repeat(num) + "\n";

     System.out.print(s.repeat(num));

   } else {

     // your error handling

   }

   scan.close();

 }

}

Explanation:

8 0
3 years ago
The computer mouse is used to
galben [10]
The answer is C , what else would you do with the mouse?
6 0
3 years ago
How does the author of let bindi have the limelight persuade readers to consider the importance of wildlife conservation
Likurg_2 [28]

Answer:

She describes the  wildlife supporter who continues to foster her father's legacy and become a television personality.She delivers bindi's message and accomplishment.

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • How many times do you need to click the Format Painter button to apply copied formats to multiple paragraphs one right after the
    9·2 answers
  • In an ha configuration, which two failure detection methods rely on icmp ping? (choose two.)
    12·1 answer
  • How many slides should a presentation include?
    11·2 answers
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    5·1 answer
  • Components that enhance the computing experience, such as computer keyboards, speakers, and webcams, are known as
    7·1 answer
  • What is the meaning of the phrase the video has gone viral
    9·2 answers
  • Can someone be my friend please i will accept you
    13·2 answers
  • Suggest why people might not want the government to carry out Internet surveillance?​
    8·2 answers
  • . Write a C++ Code to get a multiline statement Str1 from a user with a ‘$’ as return character (Hint:
    6·1 answer
  • to protect a windows 10 system, you've configured system restore to automatically protect your system using restore points. will
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!