Answer:
In photography, the rule of thirds is a type of composition in which an image is divided evenly into thirds, both horizontally and vertically, and the subject of the image is placed at the intersection of those dividing lines, or along one of the lines itself.
The responsibility for failures was deflected away from the automated parts of the system (and the humans, such as engineers, whose control is mediated through this automation) and placed on the immediate human operators, who possessed only limited knowledge and control.
Answer:
<em>C++</em>
////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
int n = 1;
while (n != 0) {
cout<<"Enter an integer, the input ends if it is 0: ";
cin>>n;
v.push_back(n);
}
cout<<endl;
///////////////////////////////////////////////////////////
int sum = 0;
int num_positives = 0, num_negatives = 0;
for (int i=0; i<v.size()-1; i++) {
if (v[i] > 0)
++num_positives;
else
++num_negatives;
sum = sum + v[i];
}
//////////////////////////////////////////////////////////
cout<<"The number of positives is "<<num_positives<<endl;
cout<<"The number of negatives is "<<num_negatives<<endl;
cout<<"The total is "<<sum<<endl;
cout<<"The average is "<<(float)sum/(v.size()-1);
///////////////////////////////////////////////////////////
return 0;
}
Answer:
I've implemented this program using python
userinput = int(input("Length: "))
mylist = []
mylist.append(userinput)
for i in range(1,userinput+1):
userinp = int(input("Input: "))
mylist.append(userinp)
smallval = mylist[1]
for i in range(1,len(mylist)):
if smallval > mylist[i]:
smallval = mylist[i]
for i in range(1,len(mylist)):
mylist[i] = mylist[i] - smallval
for i in range(1,len(mylist)):
print(mylist[i],end=' ')
Explanation:
I've added the full source program as an attachment where I used comments to explain difficult lines
We can import Scanner from Java.utils.Scanner to pull in text entered in the console.
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String password = "";
do {
System.out.print("Enter your password: ");
password = sc.nextLine();
if(!password.equals("pals") {
System.out.println(\nIncorrect Password. Try again.");
}
} while(!password.equals("pals");