Answer:
Following are the code to this question:
if(a == 0) //defining condition
{
System.out.print("no solution for a=0"); //print value
}
Explanation:
In question, it is declared, that a method defined with three double parameters, that are "a, b, and c", inside this method a code is defined, that checks the given value.
- In the method, a conditional statement defined, in the if block, it checks the value of a is equal to 0.
- If this condition is true, it will use the print method, inside the method, a message is printed, that is "no solution for a=0".
Answer:
Check the explanation
Explanation:
C++ code:
#include <bits/stdc++.h>
using namespace std;
string convert(string s){
int l=s.length();
string ans=" hours";
if(l==7){
if(s[5]=='a'||s[5]=='A'){
ans[0]='0';
ans[1]=s[0];
ans[2]=s[2];
ans[3]=s[3];
else{
if(s[6]=='a'||s[6]=='A'){
ans[0]=s[0];
ans[1]=s[1];
ans[2]=s[3];
ans[3]=s[4];
return ans;
}
int main(){
cout<<"Enter time: ";
string s;
getline(cin,s);
cout<<"Corresponding military time is "<<convert(s)<<endl;
return 0;
}
Answer: Substitution
Explanation: Substitution techniques: map plaintext elements (characters, bits) into ciphertext elements.
Print(companions);
Print(companions);
Print(companions);
Print(companions);