logo

Crowdly

COM 103: Programming Languages I (C++)

Шукаєте відповіді та рішення тестів для COM 103: Programming Languages I (C++)? Перегляньте нашу велику колекцію перевірених відповідей для COM 103: Programming Languages I (C++) в ocs-alatoo.edu.kg.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Write a program in C++ to print a square pattern with the # character.

Declare and use void draw_pattern(int n) function which draws a square with # character.

Sample Output:

Print a pattern like square with # character:

Input the number of characters for a side: 4

# # # #

# # # #

# # # #

# # # #

Переглянути це питання

Write a C++ program to check which number is closest to the value 100 among two given integers. Return 0 if the two numbers are in equal distance.

Sample output:

78, 95 => 95

95, 95 => 0

105, 95 => 0

95, 115 => 95

Переглянути це питання

Write a program in C++ to find the sum of the first n natural numbers. n is given from input. Print result as given in sample.

Use for loop to solve this task.

Sample output:

10

1+2+3+4+5+6+7+8+9+10=55

Переглянути це питання

Write a program in C++ to find the sum of the first and last digits of a number.

Use while loop to solve this task.

Sample Output:

Input any number: 12345

The first digit of 12345 is: 1

The last digit of 12345 is: 5

The sum of first and last digit of 12345 is: 6

Переглянути це питання

Write a C++ program that inputs one side of cube and calculates the volume of a cube.

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на ocs-alatoo.edu.kg?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome