#include using namespace std;int main(){int year = 12,value = 10,total = 0;do{year++;value *= 2;total += value;}while(value*2 < 1000);cout << "Age: " << year << endl;cout << "Last gift: " << value << endl;cout << "Total: " << total << endl;cin.get();return 0;
Answer:
x_inp = [ '1', '2', '3']
int_val = [ int(a) for a in x_inp ]
print("integer: int_val")
y_inp = [ '1.0', '2.0', '3.0']
flo_val = [ float(a) for a in y_inp ]
print("float: flo_val")
Explanation:
All the items in the arrays x_inp and y_inp are coverted to integer and float data types respectively with the for loop statement, which individually assigns the resolved integer and float values to the memory locations int_val and flo_val respectively.
The output becomes,
integer:
1
2
3
float:
1.0
2.0
3.0
Answer:
Functional requirements usually define if/then behaviours and include calculations, data input, and business processes. Functional requirements are features that allow the system to function as it was intended. Put another way, if the functional requirements are not met, the system will not work.
Explanation:
import java.util.Scanner;
public class U3_L6_Activity_Two{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int y = scan.nextInt();
if(x>=4|| ((y < 5) && ((x+y) < 7))){
System.out.println("pass");
}
}
}
I'm pretty sure this is what you're looking for. Best of luck.