+ 11
How to mention someone in comment in Sololearn ?
9 Respuestas
+ 14
with the help of @
+ 12
just type @ and several options will pop up.
@shehroz irfan...thats how i would call you
on android only
+ 7
thanks
+ 6
you should type @ symbol and then you'll have all the options available to tag that person.
Also, you can type first few words after @ symbol to make ragging easier.
shehroz irfan
+ 5
Use @
+ 3
Brains🇳🇬 Im on iOS and it works here too
- 1
Hi guys! Good day!
I'm a student in computer science and currently practicing basic c++ lesson,
I need help for my project that will be pass on December 11,2018 in the morning. It is all about login and signup program.
This is my code:
#include <iostream>
using namespace std;
int a,b,choice1;
int addition(int a, int b)
{
cout <<" Addition" << endl;
cout <<" Enter 1st number: ";
cin>>a;
cout <<" Enter 2nd number: ";
cin>>b;
cout <<" The sum is " << a+b << "." << endl;
}
int subtraction(int a, int b)
{
cout <<" Subtraction" << endl;
cout <<" Enter 1st number: ";
cin>>a;
cout <<" Enter 2nd number: ";
cin>>b;
cout <<" The difference is " << a-b << "." << endl;
}
int multiplication(int a, int b)
{
cout <<" Multiplication" << endl;
cout <<" Enter 1st number: ";
cin>>a;
cout <<" Enter 2nd number: ";
cin>>b;
cout <<" The product is " << a*b << "." << endl;
}
int division(int a, int b)
{
cout <<" Division" << endl;
cout <<" Enter 1st number: ";
cin>>a;
cout <<" Enter 2nd number: ";
cin>>b;
cout <<" The quotient is " << a/b << "." << endl;
}
int mod(int a, int b)
{
cout <<" Modulus" << endl;
cout <<" Enter 1st number: ";
cin>>a;
cout <<" Enter 2nd number: ";
cin>>b;
cout <<" The remainder is " << a%b << "." << endl;
}
void printSomething()
{
cout <<" Arithmetic operators" << endl;
cout <<" 1. Addition" << endl;
cout <<" 2. Subtraction" << endl;
cout <<" 3. Multiplication" << endl;
cout <<" 4. Division" << endl;
cout <<" 5. Modulus" << endl;
}
voi
- 1
This is my code:*
void callPS()
{
printSomething();
cout <<" Enter your choice: ";
cin>>choice1;
switch (choice1)
{
case 1:
addition(a,b);
break;
case 2:
subtraction(a,b);
break;
case 3:
multiplication(a,b);
break;
case 4:
division(a,b);
break;
case 5:
mod(a,b);
break;
default:
cout <<" Please input 1-5 only" << endl;
}
}
void tryAgain()
{
char c;
do{
callPS();
cout << endl;
cout <<"\n\n This is for the ARITHMETIC PROGRAM !!!" << endl;
cout <<" Do you want to try it again?" << endl;
cout <<" Press y for yes and n for no: ";
cin>>c;
}
while ((c=='y')||(c=='Y'));
}
int main()
{
char choice;
char again;
string username = "";
string password = "";
string u;
string i;
string o;
string p;
int counter=0;
bool checkAttempt = false;
do{
cout << " MAIN MENU" << endl;
cout << " 1. LOG IN" << endl;
cout << " 2. SIGN UP" << endl;
cout << " 3. EXIT" << endl;
cout << " Please enter your choice: ";
cin>>choice;
if(choice=='1')
{
cout << " LOG IN"
<< endl;
do{
cout << " Please enter your username: ";
cin>>u;
cout << " Please enter your password: ";
cin>>i;
if (u == username && i == password || u == o && i == p)
{
cout << "\n Succesfully login! Welcome to Joemar & Jason, Arithmetic Program!" << endl;
tryAgain();
}
else
{
cout << " Incorrect Username and password!" << endl;