Answer:
1
Explanation:
5x4=20 20
------------ = --------
6x4=24 24
1x4=4 4
------------ = ----------
4x6+24 24
4 + 20
--------------- = 24/24 OR 1
24 + 24
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.
Answer:
I want to finish all of my social studies homework by dinner. - <u>Short term goal. </u>
Short term goals are targets that are to be achieved in the near and immediate future such as in a day or in a week. As the goal listed is to be done on the same day, it is a short term goal.
I want to graduate in three years in the top 15% of my class. - <u>Normative Goal</u>
Normative goals are the goals people set based on what society looks upon as desirable and a good thing to do. Academic excellence is a normative goal as it is looked upon favorably by society.
I want to earn a good grade on my math test tomorrow. - <u>Intrapersonal goals.</u>
Intrapersonal goals are goals that we set within ourselves to motivate ourselves to do better. The writer here wants to do a good job in the math test which makes it intrapersonal.
I want to qualify for Honors Spanish next year. - <u>Long term goal</u>
A long term goal is one that is to be achieved in the future most likely after a period of a year. Qualifying for an Honors in Spanish in the next year is therefore a long term goal.
To insert pics or gifs or audio from the pc stored on default
Answer:
The answer to this question is given below in the explanation section.
Explanation:
When you use an array in the program, it occupies the memory where to store the data. However, it is noted that the other array cannot store the variable value where the first array has to store its variable value.
however, when you reassign the value their index position of the array, the values are reassigned. But it also depends on the CPU, because sometimes when you release the memory from the array, maybe some other programs get to occupy that location where the first array values were stored.
However, In Java, it is possible that the same int/integer comes at the same spot of the existing integer in an array, then the value at that particular index is reassigned.