0% found this document useful (0 votes)
11 views13 pages

VC++ Program Designing Experiment 2022

The document outlines a series of programming experiments using Visual C++, each with specific tasks such as sorting numbers, performing arithmetic operations, and manipulating strings. It includes tasks for calculating areas, guessing numbers, identifying odd numbers, and working with matrices. Each experiment is designed to enhance programming skills through practical coding exercises.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views13 pages

VC++ Program Designing Experiment 2022

The document outlines a series of programming experiments using Visual C++, each with specific tasks such as sorting numbers, performing arithmetic operations, and manipulating strings. It includes tasks for calculating areas, guessing numbers, identifying odd numbers, and working with matrices. Each experiment is designed to enhance programming skills through practical coding exercises.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Visual C++ Programming

Experiments

Major:

Name:

Student ID:

Year 2022 Month 6


Experiment 1
Task: for a given set of numbers {45, 21, 19, 32, 66, 70, 5, 84}, please

programming to sort them in decrease. Paste the source code and result in

below.
Experiment 2
Task: (1) design a program to calculate the output od following

expression, e+(a+b)/(c-d), the variable of a, b, c, d, e, should be assigned

by the keyboard.

(2) design a program to change input uppercase letters to output

lowercase letters, and change input lowercase letters to output uppercase

letters
Experiment 3
Task: define a function for calculating the area of a circle, where its

radius is given by keyboard, and π = 3.14.


Experiment 4
Task: For any input integer, respectively to find their bit numbers, the

order of output is from the back to the front. For example, when the input

is 1234, the output is 4,3,2,1.


Experiment 5
Task: Implement a simple four operators operation, each running time

select one “Add”, “Subtract”, “Multiply”, and “Divide” operation, ‘A’

means add, ‘S’ means subtract, ‘M’ means multiply, and ‘D’ means divide.

Input for A, S, M, D respectively prompted "data has been added,

subtracted, multiplied, or diveded", the program ends when the input is

different from A, S, M, D.
Experiment 6
Task: for a given integer number whose value is between [1, 100]. Ask

the user to guess the number, compare the size of the two numbers, and

prompt the user to the result until the correct guess.


Experiment 7
Task: programming for finding the all of odd numbers between
[1, 100]
Experiment 8
Task: Programming for finding the maximum number of following
8, 16, 4, 58
matrix 𝐴 = [17, 3, 21, 9]
51, 5, 6, 70
Experiment 9
Task: Designing C++ program to calculate the result of
1 1 1 1 1
+ + +⋯+ +⋯+
1∗2 2∗3 3∗4 𝑖∗(𝑖+1) 10∗11
Experiment 10
Task: Designing program to output the following shape: *****
****
***
**
*
Experiment 11
1 2 3 4 
Task: Suppose matrixes A is: A    , Please write C++ source
5 6 7 8

1 5
2 6
code to calculate its transport matrix B, where B should be B .
3 7
 
4 8
Experiment 12
Task: Suppose an given array, int a[5] = { 1, 2, 3, 4, 5 }, please check the

address of the array and the addresses of each elements

You might also like