Given an integer N as input, write a program to print a number diamond of 2*N 1 rows as shown below. Note: There is a space after each number. Input The first line of input is an integer N . Explanation In the given example, the number of rows in the diamond is 5 . So, the output should be Sample Input 1 5 Sample Output 1 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 1 2 3 1 2
Write a C# console app that will input a text file of numbers. For these numbers, find the number of numbers (one per line), the largest of these numbers, the smallest of these number, and the average of these numbers.
Also determine the number of numbers in the range 00000 - 09999, 10000 - 199999, 20000 - 29999, etc. all the way through 90000 - 99999.
write a program print of all anti diagonals element of matrix
consider an array marks[20][5]which stores the marks obtained by 20 students in 5 subjects
write a 2D array to show average of 5 subjects for 20 students
We have a new game show that pits three people against each other to find out who can achieve the smallest weight in a given amount of time! The idea is 100% guaranteed original. We want you to help us pick a winner by deciding who's the lightest!
Input
1. The weight of the first competitor
2. The weight of the second competitor
3. The weight of the third competitor
Output
The first line will contain a message prompt to input the weight of the first competitor.
The second line will contain a message prompt to input the weight of the second competitor.
The third line will contain a message prompt to input the weight of the third competitor.
The last line contains the smallest weight of them all.
This one is a bit tricky. You're going to have to isolate each digit of the integer to determine which one is the largest, so good luck!
Instructions:
This one is a bit tricky. You're going to have to isolate each digit of the integer to determine which one is the largest, so good luck!
Instructions:
Input a 3-digit integer.
Print the largest digit in the integer.
Tip #1: Use % 10 to get the rightmost digit. For example, if you do 412 % 10, then the result would be the rightmost digit, which is 2.
Tip #2: On the other hand, use / 10 to remove the rightmost digit. For example, if you do 412 / 10, then the result would be 41.
Tip #3: You'd have to repeat Tip #1 and Tip #2 three times for this problem because the input is a 3-digit integer.
A person to buy s shoes. Well, turns out there are only m shoes left in the shop. Determine the number of ways by which you can choose s shoes out of the available shoes in the shop. Print the answer in one line.
Write a procedure that reads a text-paragraph from a file and then prints the number of characters on the screen.