Answer:
Question 1 :Write a program to enter a number and test if it is greater than 45.6 Example:
Answer:
#include <iostream>
using namespace std;
int main()
{
int user_number=0;
cout<<"Enter a number ";
cin >> user_number;
if(user_number >45.6){
cout <<"Greater than 45.6";
}
return 0;
}
Question 2: Test if a number grade is an A (greater than or equal to 90). If so print "Great!"
Answer:
#include <iostream>
using namespace std;
int main()
{
int user_number=0;
cout<<"Enter a number ";
cin >> user_number;
if(user_number >= 90){
cout <<"Great";
}
return 0;
}
Question 3:
Test if a password entered is correct. The secret phrase is Ada Lovelace.
Answer:
#include <iostream>
#include <string>
using namespace std;
int main()
{string pass_phrase ="Ada Lovelace";
string user_password="";
cout<<"Enter password ";
getline (cin, user_password);
if(user_password == pass_phrase){
cout <<"Correct";
}
else{
cout <<"Incorrect";
}
return 0;
}
Explanation:
Answer:
C15H24O
Explanation:
n(C) = 4.497 g/44g/mol = 0.1022
Mass of C = 0.1022 × 12 = 1.226 g
n(H) = 1.473g/18 g/mol = 0.0823 ×2 moles = 0.165 moles
Mass of H = 0.0823 × 2 ×1 = 0.165g
Mass of O= 1.501 -(1.226 + 0.165)
Mass of O= 0.11 g
Number of moles of O = 0.11g/16g/mol = 0.0069 moles
Dividing through by the lowest ratio;
0.1022/0.0069, 0.165/0.0069, 0.0069/0.0069
15, 24, 1
Hence the formula is;
C15H24O
The sort function allows you do bring up the data in a order based of what you want it to be. Hope this helps.
Answer:
C. FTP
Explanation:
FTP is a network protocol for transmitting files between computers.