Input
1. First integer
2. Second integer
Output
Enter·integer·1:·10
Enter·integer·2:·20
20·110#include <iostream>
using namespace std;
int main(void) {
int a, b;
cout << "Enter integer 1: ";
cin >> a;
cout << "Enter integer 2: ";
cin >> b;
exchangeGift(&a, &b);
cout << a << " " << b;
return 0;
}
Instructions:
Output
My·destiny·=·11#include <iostream>
using namespace std;
int main(void) {
int destiny = 22;
int *ptr1, *ptr2, *ptr3;
// TODOFill in the blank
ptr1 = ;
ptr2 = ptr1;
ptr3 = ptr2;
cout << "My destiny = " << *ptr3;
return 0;
}
Create an assembly program that would check if the input character is a numeric character. alphabet (letter) or a special character.
HINT: Each character has a corresponding decimal and hex values in the ASC table. Use ASCII table.
-write a program using for loop - show numbers from(1,150)increased by 3 only print odd numbers
Create a Java program that asks the user to input a student number. The format of the student number is a sequence of the following:
Four (4) digits
A dash
Two (2) digits
A dash
Three (3) digits
Display a welcome message if the student number is valid; otherwise, show an appropriate error message. Do not copy the welcome message in the sample output.
Implement the following problem statement in python along with test cases. Let’s say you have a Customer class and you want to test calculate bill method of customer class. Bill calculation will depend on list of items customer purchased
create two class names User and administrator. the administrator class should inherit from the user class and the two classes should be members of the namespace named User Namespace.
Create an assembly program that would check if the input character is a numeric character. alphabet (letter) or a special character.
HINT: Each character has a corresponding decimal and hex values in the ASC table. Use ASCII table.
Implement the function find_roots to find the roots of the quadratic equation:= ax2 + bx + c = 0. the function should return a tuple containing roots in any order. If the equation has only one solution. The Equation will always have at least one solution.
The roots of the quadratic equation can be found with the following formula :
-b = +- square_root b2 - 4ac
for example, find _roots (2, 10, 8) should return (-1, -4) or (-4, -1) as the roots of the equation 2x2 + 10X + 8 are -1 and -4
"\\lnot"
I don't have the question but I can explain.
if given n=4,
we should able to give 4 rows and 4 column matrix as input. matrix consists of 0's and 1's
ex;- 0 1 0 0
0 0 1 0
0 1 0 1
1 1 0 0
the 0 represents an empty space. the 1 represents a mine. you have to replace each mine with a x and each empty space with a number of adjacent mines
above example should print
1 X 2 1
2 3 X 2
3 X 4 X
X X 3 1
so sample input
4
0 1 0 0
0 0 1 0
0 1 0 1
1 1 0 0
and output should be
1 X 2 1
2 3 X 2
3 X 4 X
X X 3 1