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
Levart [38]
3 years ago
15

Write a program that gets a single character from the user. If the character is not a capital letter (between 'A' and 'Z'), then

the program does nothing. Otherwise, the program will print a triangle of characters that looks like this:
Computers and Technology
1 answer:
Sholpan [36]3 years ago
4 0

This question is incomplete. The complete question is given below:

Write a program that gets a single character from the user. If the character is not a capital letter (between 'A' and 'Z'), then the program does nothing. Otherwise, the program will print a triangle of characters that looks like this:

  A

 ABA

ABCBA

ABCDCBA

Answer:

#include <stdio.h>

void printTri(char asciiCharacter){

   // Row printer

//   for(int i = 65; i <= ((int)asciiCharacter); i++){

   int i = 65;

   while(i <= ((int)asciiCharacter)){

       int leftMargin = ((int)asciiCharacter) - i; +

       int j = 1;

       while(j <= leftMargin){

           printf(" ");

           j++;

       }

       int k = 65;

       while(k < ((int)i)){

           printf("%c",(char)k);

           k++;

       }

       int l = ((int)i);

       while(l >= 65){

           printf("%c",(char)l);

           l--;

       }

       printf("\n");

       i++;

   }

}

int main()

{

   for(;;){

       printf("Please enter a character between A and Z. Enter (!) to exit \n");

       char in;

//       scanf("%c",&in);

       in = getchar();

       getchar();

       printf("Printing Triangle for: %c \n",in);

       if(((int)in) >= 65 && ((int)in) <= 90){

           printTri(in);

           printf("\n");

       }else if(((int)in) == 33){

           break;

       } else {

           continue;

       }

   }

   return 0;

}

Explanation:

  • Inside the printTri function, print spaces, characters in order as well as characters in reverse order.
  • Inside the main function, take the character as an input from user then print the triangle by validating first to ensure that the character lies between a to z alphabets.
You might be interested in
Select the correct answer. Steve wants to change shooting and exposure settings while on his photo shoot. Which camera part will
wel

B. eyepiece

will help you to do that

5 0
3 years ago
Read 2 more answers
Which ofthe following calls on human feelings, basing the argument onaudience needs or sympathies?
Artyom0805 [142]

Answer: a) Emotional appeal

Explanation: Calls on feeling of human is referred as the emotion of the humans ,thus it is said to be an emotional appeal. Other appeals in the options are for the call on technical,logical or unexpected error reason and does not relate to the human audience needs or sympathies .But emotional appeal deals with these need on being called.  So, option (a) is the correct option .

5 0
3 years ago
When a subdomain has been delegated to a zone on another server, the DNS server hosting the parent zone maintains only an NS rec
Vedmedyk [2.9K]

Answer:

True of False?

True

Explanation:

Different sub domains can be directed to different IPs servers but a client server cannot be forced to keep looking at name servers for additional records.

To delegate a subdomain to a zone on another server, one would need to add NS-records for the sub-domain name. This would point to the host names of the DNS servers hosting the sub-domain - in the parent zone.

In the "DNS records" window right-click the parent zone in the left list and select "New NS-record":

8 0
4 years ago
You open a folder Properties box to encrypt the folder, click Advanced, and discover that Encrypt contents to secure data is dim
yaroslaw [1]

Most likely a virus has attacked the system and is disabling encryption is the most likely problem.

c. Most likely a virus has attacked the system and is disabling encryption.

<u>Explanation:</u>

The end users can protect the folder by enabling encrypt the folder or files. But in windows encrypting the file or folder is not available. The computer management console is used to open all other services such as risk management, performance management extra.

In some other operating encryption of folder or files is allowed.  Third-party software is available to protect folder or files once the third party used any files possible to share outside the world.

As far as my knowledge there is encrypting technology is available in the windows operating system.

5 0
3 years ago
A franchise restaurant is attempting to understand if customers think their service is good day-to-day by summarizing a series o
Crazy boy [7]

Answer:

C++.

Explanation:

int main() {

   int num_days_scores;

   cout<<"How many days of scores? ";

   cin<<num_days_scores;

   cout<<endl;

///////////////////////////////////////////////////////////////////////////

   // Get scores for each day and add it to array

   int score = 0;

   int* score_array = new int[num_days_scores];

   for (int i = 0; i < num_days_scores; i++) {

       cout<<Enter score for day "<<i+1<<": ";

       cin<<score;

       score_array[i] = score;

   }

////////////////////////////////////////////////////////////////////////////

   // Calculate total of scores by traversing array

   int final_score = 0;

   for (int i = 0; i < num_days_scores; i++) {

       final_score += score_array[i];

   }

   cout<<"The total score of the "<<num_days_scores<<" days is "<<final_score;

////////////////////////////////////////////////////////////////////////////

   delete[] score_array;

   return 0;

}

7 0
3 years ago
Other questions:
  • Which relationship is possible when two tables share the same primary key?
    9·2 answers
  • Given a Scanner reference variable named input that has been associated with an input source consisting of a sequence of lines,
    13·1 answer
  • In order to manage information for a company, your website would need a/an
    6·1 answer
  • 2- (8 point) Write a program using the instructions below. Assume that integers are stored in 4 bytes. a) Define an array of typ
    10·1 answer
  • Lan is working on a project report that will go through multiple rounds of
    10·1 answer
  • Write a program that asks the user for the name of their dog, and then generates a fake DNA background report on the pet dog. It
    11·1 answer
  • Type the correct answer in the box. Spell the word correctly.
    15·2 answers
  • You manage a network that uses switches. In the lobby of your building, there are three RJ45 ports connected to a switch. You wa
    5·1 answer
  • Apakah kebaikan mengetahui fungsi elemen pada produk mekatronik​
    5·1 answer
  • What is containment and why is it part of the planning process
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!