Answer:
Ethernet standards are written and maintained by the IEEE, the Institute of Electrical and Electronic Engineers which has its corporate office in New York City and its operations center in Piscataway, New Jersey.
Explanation:
Computer files containing nothing but printable characters are called text files<span>.</span>
Answer:
d) rolling a pair of dice in monopoly
Explanation:
an algorithm is a process or set of rules followed in a particular order to perform a certain task. all of the other answers are a set of instructions that lead to something except for rolling a pair of dice. rolling a pair of dice can be a part of instruction but its not a process in itself.
hope this makes sense!
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.