1.
#include <iostream>#include <string>
using namespace std;
int main(){ string chars; // This is where we will put our @ signs and print them for(int x=0;x < 5; x++){
chars = chars + '@'; // This will concatenate an @ sign at the end of the variable cout << chars << "\n"; }}
2.
#include <iostream>#include <string>
using namespace std;
int main(){ string name; // Our variable to store the name cout << "What is your name? \n"; // Asks the user for their name cin >> name; cout << "\nWell, hello " << name << "!";}
3.
#include <iostream>#include <string>
using namespace std;
int main(){ int number; // Our variable cout << "Enter a number\n"; // Asks for a number cin >> number; cout << "You entered " << number << "%!";}
4.
#include <iostream>#include <string>
using namespace std;
int main(){ int number; // Our variable cout << "Enter a number\n"; cin >> number;
int check = number % 2; // The modulo operator (the percent sign) gets the remainder of the quotient if (check == 0) { cout << number << " is even!"; // If the remainder is 0 then it prints out "x is even" } else { cout << number << " is odd!"; // If the remainder is not 0 then it prints out "x is odd" }}
5.
#include <iostream>#include <string>
using namespace std;
int main(){ float r; // Our variable cout << "Enter a radius\n"; cin >> r; if (r < 0){ cout << "Lol. No."; // If the radius is less than zero print out that message } float circumference=2*3.14*r; float area=r*r*3.14; cout << "\n\n Circumference of circle: " << circumference; cout << "\n Area of circle: " << area;}
<u>Drastic change of over society Computers:</u>
In society computer has drastically changed and it has been used to for varies purpose to do analysis or storing data, as decisions making tools. Purpose computer been found is to do huge calculation. “Compute” word has been derived to computer. Computer later stage it diverted is purpose from calculation to information store device.
Computers have heavy effect the communication in normal word and business world. Especially social media took over the control of computers. In today’s world four type of ethical issue are known in computer mainstream in the workplace they are.
1. Crime (computer)
2. failure of responsibility in the computer.
3. Protection of software records and documents etc.
4. End user data protection and privacy.
99% of computers are protected with firewalls and antivirus. But still hackers can hack the computer and steal the data.
Computer Science uses the power of computers to solve problems.
27 mujeres
18 hombres
Mira:
60% * 45 = 2,700
2,700/100= 27
Si el 60% son mujeres, entonces
45-27=18 hombres