Using the knowledge of pseudocodes it will be possible to write a code that calculates the amount of hours worked and giving warnings about it.
<h3>Writing a pseudocode we have that:</h3>
<em>while </em>
<em>if number == 0</em>
<em>break</em>
<em>hours =0 </em>
<em>for i =1 to 5 </em>
<em>hours = hours + time_out[ i ] - time_in[ i ]</em>
<em> If hours >36 : </em>
<em>print ( "Name is " ,name)</em>
<em>print( "No of hours are ",hours)</em>
<em>print("Congratulaion! Your working hours are more than 36")</em>
<em>If hours <30 : #</em>
<em>print ( "Name is " ,name)</em>
<em>print( "No of hours are ",hours)</em>
<em>print("Warning !!!")</em>
<em>End loop</em>
See more about pseudocode at brainly.com/question/13208346
#SPJ1
Answer:
#include <iostream>
#include <map>
using namespace std;
int main()
{
map<int, int> numbers;
cout << "Enter numbers, 0 to finish" << endl;
int number;
while (true) {
cin >> number;
if (number == 0) break;
numbers[number]++;
}
for (pair<int, int> element : numbers) {
std::cout << element.first << ": occurs " << element.second << " times" << std::endl;
}
}
Explanation:
One trick used here is not to keep track of the numbers themselves (since that is not a requirement), but start counting their occurrances right away. An STL map< > is a more suitable construct than a vector< >.
Answer:
one-dimensional
Explanation:
According to my research on studies conducted by psychologists, I can say that based on the information provided within the question I can say that the theory or model of what caused his phobia is one-dimensional. This can be said because by growing up in a single closed environment he does not have experience when finally being part of society, therefore his personality or characteristics are one-dimensional.
I hope this answered your question. If you have any more questions feel free to ask away at Brainly.
Answer:
public class Brainly
{
public static void main(String[] args)
{
BinaryConverter conv = new BinaryConverter();
String binStr = "01001101";
System.out.print(binStr + " in decimal is "+conv.BinToDec(binStr));
}
}
public class BinaryConverter
{
public int BinToDec(String binStr)
{
int d = 0;
while(binStr.length() > 0)
{
d = (d << 1) + ((binStr.charAt(0) == '1') ? 1: 0);
binStr = binStr.substring(1);
}
return d;
}
}
Explanation:
The program "eats" the string from left to right, and builds up the integer representation in variable "d" on the go. While there are digits left, it shifts the previous result to the left and sets the least signficant bit to 1 only if the corresponding string character is a 1.
They are called functions on a spreadsheet.