Any four challenges faced while selecting program development tools
Hollow Right Triangle
Given an integer number
N as input. Write a program to print the hollow right-angled triangular pattern of N lines as shown below.
Note: There is a space after each asterisk (*) character.
Input
The first line of input is an integer
N.
Explanation
In the given example the hollow right angled triangle of side
4. Therefore, the output should be
* * * *
* *
* *
*Diamond Crystal
Given an integer value
N, write a program to print a diamond pattern of 2*N rows as shown below.
Input
The first line of input is an integer
N.
Explanation
In the given example, the number of rows in the diamond is
2*5 = 10.
So, the output should be
/\
/ \
/ \
/ \
/ \
\ /
\ /
\ /
\ /
\/How to determine the types of data files?
A. Write I if the statement is Interval, N if Normal, R if Ratio, and O if Ordinal.
1. Military title
2. Temperature in degree celcius
3. Birthplace
4. Year level
5. Favorite type of music
6. Clothing such as hat, shirt, shoes
7. A score in 5-item quiz in Math
8. Feeling for today
9. Means of transportation to school
10. How internet is used at home
Consider the code snippet given below:-
[Assume the necessary header files and namespaces included]
int x=10;
int main()
{ int x=20;
{ int x=30;
}
return 0;
}
Include the ‘cout’ statements at appropriate places in the program to get the output
10 20 30