- Install Visual Studio and MSDN Library Documentation.
- Describe the class
System.Console
. - Describe the method
System.Console.WriteLine()
. - Compile and run a program using the Command Line Interface.
- "Добър Ден!".
- First and last name.
- Print
$1, 101, 1001$ . - Print date and time.
- Square root of
$12345$ . - Write the first 100 terms of the sequence $2, -3, 4 , -5, 6 , -7, 8...$.
- Read age and print age after 10 years.
- Differences between
C#
and.NET Framework
. - Compile a list of the most famous program languages; their differences from
C#
. - Decompile Exercise 5 . Use ILSpy-2.3.1 - Decompiler
- Match values with appropriate types.
- Witch of the values could be assigned to
float
,double
anddecimal
. - Calculate with precision up to the sixth digit after the decimal point.
- Initialize an
int
with the hexadecimal value256
. - Initialize a
char
with the symbol with Unicode value72
. - Define a variable of type
bool
namedisMale
and initialize it properly. - Define two
string
s, concatenate them and assign the result to variable of typeobject
. - Define two
string
s, concatenate them and assign the result to variable of typeobject
; Initialize astring
with the value held in the variable of typeobject
. - Use escape sequences or @-quoted strings to declare a
string
containing"
or\
. - Print a shape of heart using the symbol
o
. - Print an isosceles triangle using the symbol © (copyright).
- Company employees first-, last- name, gender and ID.
- Swap the values of two
int
variables.
- Check whether a number is odd or even.
- Check if a number is perfectly divisble by
$5$ and$7$ . - Is the 3rd least significant digit is
7
. - Is the 3rd bit of a number
0
or1
. MSB enumeration from right to left LSB -
Area of a trapezium from given
a
,b
andh
. - Area and circumference of a rectangle from given length and height.
- Calculate the weight of an human on the Moon, given his weight on Earth.
- Check if a point is within a given circle.
- Check if a point is within a given circle and out of a rectangle.
- Number's digits manipulation: sum, reversed digits, swap first/second and last/third.
- Print the bit on position
p
in the numbern
. - Given a number
n
, check if the bit on positionp
has a valuev = 1
. - Given a number
n
, a positionp
and a bit valuev
. Write a program that sets the bit at positionp
to valuev
in numbern
. - Check if a number is prime.
- Swap the bits at positions 3, 4 , 5 with those at positions 24, 25, 26.
-
Swap
k
number of bits starting a positionp
withk
number of bits starting at positionq
.
- Read1 three
int
s from the console and print their values. 1. "Read"/"Write" to/from Standard Input/Output. - Read a radius of circle ,
r
, and print its area and circumference. - Read and print company data: name, address, phone number, FAX, website and manager (first-, last- name and phone number).
- Output formatting: print three columns of numbers with: width = 10, left aligned, first column: hexadecimal , second column: positive floating point, negative floating point. The last two columns to be rounded up to the 2nd digit after the decimal point.
- Find perfectly divisible to
5
numbers within[a,b]
, wherea
andb
read from console. - Read two numbers, print the largest without the use of conditional expressions.
- Read five numbers and print the largest of them.
- Read five numbers and print their sum. (Check input validity).
- Find the real roots of the quadratic equation, read the coefficients
a
,b
,c
from the console. - Sum
n
numbers, read them from console. - Read a number
n
, print all the numbers within[1, n]
on a new line. - Print the first 100 terms of Fibonacci sequence.
- Accumulate the first 1000 terms of the
Harmonic Series
.
- Write an
if
construction such that it swaps the values of two variables if the first is larger than the second. - Print the sign (
+
,-
) of the product of thee numbers without actually calculating it. (Useif
statements) - Find the largest value among the values of three numbers.
-
Sort three real integers in descending order using nested
if
statements. - Read an integer
[0,9]
and print its name in Bulgarian. - Print the roots (0 ,1 or 2 real roots) of the quadratic equation.
- Find the largest among 5 integers.
- Define variables of type
int
,double
andstring
. Depending on their type, increment the value if the type is within the first two, append*
if it is the last; print them. (Useswitch
statement) - Given five
int
values, find all subsets (if existent) that sum up to0
. - Apply the following rules for the number,
n
(within$[1,9]$ ) read from the console: ifn
in:$[1,3]$ ->n * 10
;$[4,6]$ ->n * 100
;$[7,9]$ ->n * 1000
. - Read a number
n
within [0,999] and print its name in Bulgarian language.
- Read a number
n
. Print the numbers from$1$ to$n$ . - Read a number
n
. Print all the numbers within$[1, n]$ not divisible by$3$ and$7$ . - Read a sequence of integers. Print the numbers with min and max values.
- Print all the possible playing cards. (52 in total, 4 colours and 13 ranks)
- Read a number
n
. Print the firstn
terms of the Fibonacci sequence. - Read
n
andk
. Print$\frac{n!}{k!}$ , where$1 < k < n$ . - Read
n
andk
. Print$\frac{n! * k!}{(n - k)!}$ , where$1 < k < n$ . - Read
n
and calculate the nth Catalan number. - Read
n
andx
. Calculate the firstn
terms of the series$\frac{n!}{x^n}$ . - Read
n
, wheren < 20
and print a matrix where each next row contains the incremented values of the above, starting with1,2,...n
. - Calculate the number of trailing zeroes of a factorial of a given value
n
. - Convert a number from decimal to binary representation.
- Convert a number from binary to decimal representation.
- Convert a number from decimal to hexadecimal representation.
- Convert a number from hexadecimal to decimal representation.
- Read
n
, print the numbers within$[1,n]$ in random order. - Read
a
andb
. Find the greatest common divisor ofa
andb
. - Read
n
. Print n x n matrix with values increasing in a clockwise inward pattern, starting from element with matrix index 00 and value1
.
- Define and print an
int
array of size20
with elements initialized to values equal to their index multiplied by5
. - Read two arrays and check if they are identical.
- Compare two
char
arrays lexicographically. - Find the longest sub-array of adjacent elements with identical values.
- Find the longest sub-array of adjacent elements with increasing values.
- Find the longest sub-array (with the smallest indexes) of consecutive elements with increasing values.
- Read
n
andk
. Readn
elements to populate anint
array. Findk
adjacent elements with max sum. - Implement selection sort algorithm that sorts an
int
array in increasing order. - Find the
int
sub-array with max sum. - Find mode of
int
array . - Read
sum
. Find whether there is a sub-array of elements that sum up tosum
. - Read
n
. Print n x n matrix with values increasing in different patterns (in terms of the indexes of the matrix elements). - Read
n
andm
. Define a n x m matrix and populate its elements. Find a3 x 3
submatrix with maximum sum of its elements. - Find longest sequence (horizontal, vertical, diagonal) of identical
string
s within a 2Dstring
array. - Read a word and print the indexes of its letters, where the letters of the English alphabet are within
$[0,25]$ . - Implement binary search for
int
array. - Implement merge sort for
int
array. - Implement quick sort for
int
array. - Find primes within
$[1, 10000000]$ . - Check if an
int
array ofn
elements contains a sub-array with elements that sum up tos
. - Check if an
int
array ofn
elements contains a sub-array withk
elements that sum up tos
. - Read
n
elements to populate anint
array; remove minimal number of elements such that the array is sorted in ascending order. - Print all permutations of
n
elements. - Print all
k
variations ofn
elements. (no repetition) - Print all
k
combinations ofn
elements. (no repetition) - Go through matrix elements in specific pattern: in parallel/perpendicularly to the main diagonal starting from the bottom.
- Find the largest region of horizontally or vertically adjacent elements with equal values within a 2D
int
matrix.
- Convert
int
andfloat
numbers into binary strings. - Convert a binary string to hexadecimal and decimal.
- Convert hexadecimal to decimal and binary.
- Convert decimal to binary.
- Convert binary to decimal.
- Convert decimal to hexadecimal.
- Convert hexadecimal to decimal.
- Convert hexadecimal to binary.
- Convert binary to hexadecimal.
- Convert binary to decimal using Horner's method.
- Convert Roman numeral to Arabic.
- Convert Arabic numeral to Roman.
- Given
N, S
andD
, where2 <= S
and16 >= D
. Convert numberN
from baseS
to baseD
. - Store
0.000001
infloat
,double
anddecimal
and sum it50000000
times. Observe rounding error and execution time. - Extract sign, exponent and mantissa of
float
number.
From now on, it is implied that all the tasks must be implemented via methods.
- Print a greeting by name read from standard input. Create a Unit Test for the implemented method.
- Implement
GetMax(int a, int b)
returning the largest of the two input parameters. - Return the English name of the last digit of a number.
- Read an number
n
. Check how many timesn
occurs in an integer array. Write a test unit for the method. - Read an index
n
. Check if an element with indexn
is smaller- or greater- than its two adjacent. Write a test unit. - Find the first array element larger than its two adjacent.
- Reverse integer digits.
- Sum large integers represented as arrays, using Little-Endian representation.
- Write a method that finds element with max value in sub-array. Use the method to sort an array in ascending / descending order.
- Calculate
n!
, where1 < n <= 100
. UseBigInteger
or array representaion. - Implement a program that contains a menu prompting the use to: reverses integer digits, calculates arithmetic mean, finds the root of the linear eqation. Checks input validity for the three cases.
- Sum polynomials.
- Multiply polynomials.
II.Homework
- Print "Hello C#".
- Simple Algebraic Expression.
- GUI application: simple summator.
- Web application: simple summator.
- Print the numbers from
1
to20
, each on a new line. - Print a right-angle triangle using the symbol
*
. - Read base
a
and heightb
, calculate the area of rectangle. - Read side length
N
, print a square of asterisks with side lenghtN
.
- Visual Studio blank solution. Collect projects related to different exercises under common solution.
- Square area.
- Inch to centimeter unit converter.
- Greetings by personal name.
- Text and character concatenation.
- Trapezium area.
- Circle area and perimeter.
- Rectangle area.
- GUI application BGN to EUR currency converter.
- Triangle area.
- Celsius to Fahrenheit degrees converter.
- Degrees to radians angle units converter.
- GUI application USD to BGN currency converter.
- Multiple currency converter.
- Astronomical date manipulation.
- GUI application push a button appearing on random location.
- Number of classroom seats.
- Area of figures.
- Bonus score.
- Cheap transport.
- GUI Currency converter.
- Equal words.
- Even or odd.
- Excellent or not.
- Excellent result.
- Greater number.
- Metric converter.
- Number from 1 to 100 to text.
- Numbers from 100 to 200.
- Number to text.
- Password guess.
- Simple conditions.
- Speed info.
- Sum seconds.
- Swimming pool pipes.
- Three equal numbers.
- Time in 15 minutes.
- Cinema.
- Fruit or Vegetable.
- Fruit shop.
- Invalid Number.
- On time for the Exam.
- Personal Title.
- GUI Point and Rectangle.
- Point in Rectangle.
- Point in the figure.
- Point on Rectangle border.
- Small shop.
- Trade comission.
- Volleyball.
- Voyage.
- Equal Pairs.
- Half Sum Element.
- Histogram.
- Latin Letters.
- Left and Right Sum.
- Max Number.
- Min Number.
- Numbers 1 to 100.
- Numbers ending in 7.
- Odd - Even Position.
- Odd - Even sum.
- Perfect division.
- Sum numbers.
- GUI Turtle Graphics.
- Vowels Sum.
- Butterfly.
- Christmas Tree.
- Diamond.
- Draw fort.
- House.
- Triangle with dollars.
- Rectangle of 10 by 10 Stars.
- Rectangle of N by N stars.
- Rhombus stars.
- Square of stars.
- Sunglasses.
- Web Application Rattings.
- Check prime.
- Enter even number.
- Even powers of
2
. - Factorial.
- Fibonacci.
- Web app Fruits web game.
- Greatest common divisor.
- Number pyramid.
- Numbers from 1 to N with step 3.
- Numbers in range.
- Numbers from N to 1.
- Number table.
- Powers of
2
. - Sequence of
2k + 1
. - Sum digits.
- Magic numbers.
- Stupid password generator.
III.Exam Practice.
- Triangle.
- Pairs.
- House.
- Magic Dates.
- Bits Killer.
- Fruit Market.
- Biggest triple.
- Wine Glass.
- Longest Alphabetical Word.
- Bit Shooter.
- Inside The Building.
- Student Cables.
- Programmer DNA.
- Magic Car Numbers.
- Bit flipper.
- Torrent Pirate.
- Basket Battle.
- Dumbbell.
- Encrypted Matrix.
- Game of Bits.
- Array Matcher.
- Currency Check.
- Dream Item.
- Knight Path.
- Magic Wand.
- Beer Stock.
- Cake Tycoon.
- Emergency Repairs.
- Illuminati Lock.
- Master Herbalist.
Remarks:
No enumeration of the (sub)chapter contents, e.g 3.1; 3.2
Page 265, Proposed Solution to Exercise 15: upper case / lower case ? `(int) ch - (int) 'A'`, `(int) ch - (int) 'a'`.
Errata:
Page 260-1, Exercise 14 : Matrix rows next to each other and on next page.
Page 262, Exercise 26 : Firtst row of right matrix appended at the bottom of the left.
Page 330, Triangles with different size: all but two lines from the triangle on the rhs of the picture indented.
The word "съответно" in Chapter 9 appears a lot.
OS: Windows 10
IDE: Visual Studio 2015
MIT License
Copyright (c) 2017 Chris B. Kirov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.