Answer:
The risks associated with this kind of connectivity are that online hackers may see your information and that makes the human race too dependent on robots and technology which is never a good thing.
Explanation:
<h3>be happy</h3>
Answer:
Check the explanation
Explanation:
Here is the program with function definition and two sample calls.
Code:
#include <iostream>
using namespace std;
//checkMe FUNCTION which takes values a, b and c
void checkMe(char &a, int &b, int &c)
{
//if sum of b and c is negative and a is 'n', b and c are set to 0, otherwise a is set to 'p'
if((b+c)<0 && a=='n')
{
b = 0;
c = 0;
}
else
{
a = 'p';
}
}
int main()
{
//first test case when else part is executed
char a = 'n';
int b = 5;
int c = 6;
checkMe(a, b, c);
cout<<a<<" "<<b<<" "<<c<<endl;
//second test case when if part is executed
a = 'n';
b = -4;
c = -5;
checkMe(a, b, c);
cout<<a<<" "<<b<<" "<<c<<endl;
return 0;
}
Kindly check the Output below:
Answer:
Following are the output of the given code:
Output:
12 20
Explanation:
Description of the code:
- In the java program code, two integer variable "j and k" is defined, that stores a value, that is "10 and 8", in its respective variable.
- After storing the value it uses the "j and k" variable, in this, it increments the value of j with 2, and in the k variable, it adds the value of j and stores the value in k.
- After incrementing the value, the print method is used that prints the value of "j and k", i.e, "12 and 20".
Answer:
import java.util.Scanner;
public class num2 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter Name");
String name = in.next();
System.out.println("Enter Age");
int age = in.nextInt();
System.out.println("The age of "+name +" is "+age);
}
}
Explanation:
Java programming language is used to write the code.
The scanner class is used to prompt and receive values for name and age which are stored in the appropriate variables.
The key idea here is using string concatenation in the output statement in order to print the desired output