8-28-26 free friday


today i learned about c++ a coding language thats very confusing but here’s some screenshots and pictures of the code from the practice we did

cout << "\n############### problem 1 ##################\n\n";
int number;
cout << "enter a number: ";
cin >> number;

if (number > 0) {
	cout << "the number is positive" << endl;
}

if (number < 0) {
	cout << "the number is negatived" << endl;
}

else if(number == 0) {
	cout << "the number is 0" << endl;
}

cout << "\n############### problem 2 ##################\n\n";
int score;
cout << "enter the score: ";
cin >> score;
if (score >= 60) {
	cout << "you passed" << endl;
}

here’s a lil bit of the code from the c++ code where itll ask the user to place a number and tell you if the number is positive or negative while the 2nd one asks the user to place a score and itll tell you if you passed or failed based on the number given

but yea today we learned c++ coding language and used the else if statements and used them in the code shown above


Leave a Reply

Your email address will not be published. Required fields are marked *