Computers are now a fact of life. Computers have created a very effective information system to help streamline the management of an organization. This makes it a much needed tool for every business, banking, government, entertainment, daily life, industry, education, and administration. It can be said of all large organizations, whether the department government or private, use a computer for a variety of their daily business and it is the fastest growing industries in the world today. Each organization usually has one or more large computer systems and a number of microcomputer. The system is a great computer for data processing tasks, while many small microcomputer to use as word processing. Computers have become part of our lives is essential. In general, the use of computers can be divided into several groups.
Answer:
#include <bits/stdc++.h>
using namespace std;
int main() {
string ms;
getline(cin,ms);
stack<char>st;
for(int i=0;i<ms.length();i++)//Inserting every element in the stack..
{
st.push(ms[i]);
}
while(!st.empty()) //doing operation until the stack is not empty..
{
char a=st.top();//accessing the top element of the stack...
st.pop();//removing the head.
cout<<a;//printing the character..
}
return 0;
}
Input:-
murder
Ouput:-
redrum
Explanation:
An easy way to reverse anything is to use stack.Since stack is LIFO type data structure so the last item in will be the first one to get out hence it reverses the elements.So inserting every element of the string into the stack of characters and then printing the every element of the stack from top to bottom.
Answer:
import java.util.Scanner;
public class TestClock {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int sum = 0;
char op;
do{
System.out.println("Enter two numbers");
int num1= in.nextInt();
int num2 = in.nextInt();
sum = sum+num1+num2;
System.out.println("Do you wish to perform another operation, Y/N");
op =in.next().charAt(0);
}while(op =='Y'||op=='y');
System.out.println("sum "+sum);
}
}
Explanation:
The code is implemented in Java progrmming language
- create an integer variable sum
- create a character variable op
- create a do while loop to request user to enter num1 and num2
- Request the user to also enter a char Y/N (yes or no repectively)
- While the char is Y keep adding up the sum and prompt the user to enter two new numbers
- Else break out of the loop and print the sum
Provide us with this "sum" function, and we can tell you. We aren't psychic.
Science and mathematics. STEM can also be engineering but in John’s case, he’s a METEOROLOGIST WHO DOES THE WEATHER FORECAST and meteorologists is part of a study in science and also mathematics because of measuring the speed of some related computations