Answer:
Algorithm:
1. Declare an integer variable N.
2. Read the value N from user.
3.While(N):
3.1 find r=N%10;
3.2 print r in new line.
3.3 Update N as N=N/10.
4.end program.
Implementation in C++.
// header
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variable
int N;
cout<<"Enter an Integer:";
cin>>N;
// find the digits of number
while(N)
{
// last digit
int r=N%10;
// print last digit
cout<<r<<endl;
// update the number
N=N/10;
}
return 0;
}
Output:
Enter an Integer:329
9
2
3
Answer:
i think Make variables to represent the length and width of a rectangle, called length
and width
, respectively. You should set length
to 10 and width
to 5.
Then, write some mathematical expressions to computer the area and perimeter of the rectangle and save these values inside variables named area and perimeter
.Use print
statements to display the area and perimeter of the rectangle.
Your output should print the area on the first line and the perimeter on the second, like this:
50 30 Rectangle Area Formula:
Area = L * W
Explanation:
Answer:
A union (UNION(x,y)) of the sets Sx and Sy represented by x and y, respectively will perform ________4_________ update(s) of the attribute.
Explanation:
The UNION (x, y) disjoint-set data structure unites the dynamic sets that contain x and y, say Sx and Sy, into a new set. It is called the union of the two sets. Before the union operation, the two sets are disjoint. After the union operation, the representative of the resulting set is some member of Sx and Sy or either Sx or Sy. The sets Sx and Sy are then destroyed to remove them from the union collection S. So, four operations are required.
Answer:
Hi, this program allows you to calculate a sphere’s area and volume depending on the radius of your choosing.
Please give brainliest, means alot!