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
What is the purpose of using a good e-mail technique?. Demonstrate your ability to write good e-mails b. Completely describe you
densk [106]
B. Completely describe your entire thought process
3 0
3 years ago
In Super Mario 64, a character called Lakitu follows Mario around on a cloud, filming him with a camera as though he were shooti
ella [17]

Answer:

A second person prespective

Explanation:

6 0
2 years ago
Read 2 more answers
How is a technical certificate like a computer-related associate degree?
satela [25.4K]

Technical certificate like a computer-related associate degree because They both provide evidence for specialized training.

<h3>What is technical certification?</h3>

Technical certifications is known to be made up of all the coursework and testing that gives one the right to claim mastery of a specific technical skill set.

Hence, Technical certificate like a computer-related associate degree because They both provide evidence for specialized training as one do need a degree to practice it.

Learn more about Technical certificate from

brainly.com/question/24931496

#SPJ1

4 0
2 years ago
What is the most common form of renewable energy used to generate electricity
sertanlavr [38]

i think that it’s either sunlight or solar energy

6 0
2 years ago
Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The
baherus [9]
<h2>Question:</h2>

Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The formula for the calculation is as follows:

futureValue = investmentAmount * (1 + monthlyInterestRate) ^ years * 12

Note: Allow users to enter the values of the investmentAmount, monthlyInterestRate and years from standard input.

Assume the number of years is always a whole number.

<h2>Answer:</h2>

===================================================

//import the Scanner class

import java.util.Scanner;

//Class header definition

public class FutureValue{

   

    //Main method definition

    public static void main(String []args){

       

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //Prompt the user to enter the investment amount

       System.out.println("Enter the investment amount");

       

       //Store the input in a double variable called investmentAmount

       double investmentAmount = input.nextDouble();

       

       //Next, prompt the user to enter the interest rate

       System.out.println("Enter the interest rate in percentage");

       

       //Store the input in a double variable called interestRate

       double interestRate = input.nextDouble();

       

       //Convert the interest rate to decimal by multiplying by 0.01

       interestRate *= 0.01;

       

       //Convert the interest rate to monthly interest rate by dividing the

       //result above by 12

       double monthlyInterestRate = interestRate / 12;

       

       //Prompt the user to enter the number of years

       System.out.println("Enter the number of years");

       

       //Store the input in an integer variable called years

       int years = input.nextInt();

       

       //Using the given formula, find the future value

      double futureValue =  investmentAmount * Math.pow(1 + monthlyInterestRate, years * 12);

       

       //Print out the future value

      System.out.println("Future value : " + futureValue);

       

    } //End of main method

     

}  // End of class definition

===================================================

<h2>Sample Output</h2>

===================================================

<em>>> Enter the investment amount </em>

1000

>> <em>Enter the interest rate in percentage </em>

10

>> <em>Enter the number of years </em>

5

Future value : 1645.3089347785854

===================================================

<h2>Explanation:</h2>

The code above has been written using Java. The code contains comments explaining every line of the code. Please go through the comments. The actual lines of code have been written in bold-face to distinguish them from comments. A sample output has also been provided as a result of a run of the code.

8 0
3 years ago
Other questions:
  • Doe's anyone know how to access developer mode on a Chromebook laptop if enterprise enrollment blocks it?
    14·2 answers
  • In order to allow communication between vlans for exchange of data what must be used?​
    15·1 answer
  • What computer system was the first to run the unix operating system?
    11·1 answer
  • When would you use an omnidirectional microphone?
    9·1 answer
  • Which of the following methods is the easiest way to set up a VPN client on a computer for a user who is not technical?
    12·1 answer
  • Which field of study would be most useful for a person who wants to work in a recycling plant?
    12·2 answers
  • You are almost finished updating a Website. As part of the update, you have converted all pages from HTML 4.0 to HTML5. The proj
    7·1 answer
  • Help? brainliest and point
    15·1 answer
  • Decision support systems help managers use structured data to identify problems and find solutions to business-related problems.
    10·1 answer
  • Aii so is anyone pushing P?<br> if u are u a g
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!