Answer:
Selection statements (sometimes called conditional statements) can be defined as code (statements) that is executed only when a certain condition is satisfied.Selection is a powerful tool to control when and which code statements will run.
Answer:
Documents: For composing letters, flyers, essays, and other text-based files (similar to Microsoft Word documents)
google sheets logo Spreadsheets: For storing and organizing information (similar to Microsoft Excel workbooks)
google slides logo Presentations: For creating slideshows (similar to Microsoft PowerPoint presentations)
google forms logo Forms: For collecting and organizing data
google drawings logo Drawings: For creating simple vector graphics or diagrams
Explanation:
Windows OS and Mac OS are examples of single user, multi tasking Operating Systems.
Answer:
#include <iostream>
#include <string>
#include <stack>
#include <math.h>
using namespace std;
int main() {
string s;
double n=0;
int position=0;
stack<int> wholeNumbers;
cout<<"Enter a decimal number:";
cin>>s;
string::iterator counter = s.begin();
while(*counter!='.' && counter!=s.end()){
wholeNumbers.push(*counter-48);
counter++;
position=position+1;
}
for(int i=0;i<position;i++){
n=n+(wholeNumbers.top()*pow(10,i));
wholeNumbers.pop();
}
position=-1;
if(counter!=s.end()){
counter++;
}
while(counter!=s.end()){
n=n+((*counter-48)*pow(10,position));
position=position-1;
counter++;
}
cout<<n;
}
Explanation:
- Inside the while loop, push the push a number to the wholeNumbers stack by subtracting it with 48.
- Increment the counter and position variable by 1 inside the while loop.
- Count the number of digit, push each digit to top of stack and find the end of the number,
- Run a for loop up to the value of position variable and pop a value from the wholeNumbers stack.
Answer:
A
Explanation:
because loop always comes in events