Answer:
#include <stdio.h>
int main(void) {
char triangleChar;
int triangleHeight;
printf("Enter a character:\n");
scanf(" %c", &triangleChar);
printf("Enter triangle height:\n");
scanf("%d", &triangleHeight);
printf("\n");
int i, j;
for(i = 0; i < triangleHeight; ++i) {
for(j = 0; j <= i; ++j) {
printf("%c ", triangleChar);
}
printf("\n");
}
return 0;
}
Explanation:
- Get the character and height as an input from user.
- Run the outer loop up to the height of triangle.
- Run the inner loop up to the value of i variable and then display the character inside this loop.
Answer:
The expression is given below:
max(population1,population1)// calling the function max
Explanation:
Following are the description of expression
- As mention in the question population1 and population2 are the two integer parameter or we can say that they are the two variable.
- To calling any function following are the syntax
functionname(argument list).
- In this as already mention max is function name and population1 and population2 are the integer value so we have write max(population1,population1)
Answer:
Computer hardware is any physical device used in or with your machine, whereas software is a collection of code installed onto your computer's hard drive. For example, the computer monitor you are using to read this text and the mouse you are using to navigate this web page are computer hardware.
All software utilizes at least one hardware device to operate. For example, a video game, which is software, uses the computer processor (CPU), memory (RAM), hard drive, and video card to run. Word processing software uses the computer processor, memory, and hard drive to create and save documents.
If a code word is defined to be a sequence of different letters chosen from the 10 letters A, B, C, D, E, F, G, H, I, and J, wha
netineya [11]
Answer:
The answer is 6:1 .
Explanation:
We don't need to have prior knowledge of combination or permutation.
Count the way to chose 4 letters.As given in the question chose sequence of different letters
For first place we have 10 letter
For second place we have 9 letter as one is already out
For 3 place we have 8 letter as two letter are already out
For 4 place we have 7 letter as three letter are already out
Total group of 4 letters = 10 * 9 *8*7
Similarly form group of 5 letters we have
Total group of 5 letters = 10 * 9* 8 * 7*6
then Calculating ratio between 4 and 5
We have,
Group 5 : Group 4 ::10 * 9* 8 * 7*6:10 * 9 *8*7
: : 30240 : 5040
divide by 5040 on both side we get
Group 5: Group 4 :: 6 : 1
I think it is double click