Jump to content

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
Posted
	 $item->equip_jobs_dropdown = build_equip_job_dropdown( array(
				 'id' => 'item-equip_jobs',
				 'class' => 'combobox dk poshy-tooltip-left',
				 'bitmask' => $item->equip_jobs,
				 'multiple' => 'multiple',
				 'size' => '5',
				 'others' => ' title="Which jobs this item is available for. Values below can be combined to achieve availability for multiple job classes.<span>Tip:</span> Hold CTRL on your keyboard while selecting/deselecting an option." style="height:80px;"',
				 )
	 );

Posted

Couldn't figure out how to rename files on codeblocks so I made a new cpp file and copied and pasted my noob ass calculator ive bee making.

#include <iostream>
#include <string>
#include <limits>

using namespace std;

int main(){

       /*Setting up the 3 main variables*/

       int calc, num1, num2;

       /*In forming the user to input the first number.*/

       cout << endl << "\nPlease enter the first number: ";

       /*Setting the variable 'num1' to the number the user input.
         and checking to make sure the user input is a whole number.*/

       while (!(cin >> num1)){
           cin.clear();
           cin.ignore(numeric_limits<streamsize>::max(),'\n');
           cout << endl << "Please input a proper 'whole' number!: " << "\n\nPlease enter the first number: ";}

       cout << endl << "\nPlease enter the second number: ";

       /*Setting the variable 'num2' to the number the user input.
         and checking to make sure the user input is a whole number.*/

       while (!(cin >> num2)){
           cin.clear();
           cin.ignore(numeric_limits<streamsize>::max(),'\n');
           cout << endl << "Please input a proper 'whole' number!: " << "\n\nPlease enter the second number: ";}

       /*A little 'menu' like output informing users of what number for each operation.*/

       cout << "\n1: Add\n2: Subtract\n3: Multiply\n4: Divide\n\n" << "Option: ";

       /*Setting the variable 'calc' to the number the user input,so the calculator knows what operation to use.
         and checking to make sure the user input is a whole number.*/

       while (!(cin >> calc)){
           cin.clear();
           cin.ignore(numeric_limits<streamsize>::max(),'\n');
           cout << endl << "Please input 1-4: " << "\n\nOption: ";}

       /*Checking what operation was chosen and doing the math.*/

       if(calc == 1){
           cout << endl << num1 << "+" << num2 << "= " << num1 + num2;}

       if(calc == 2){
           cout << endl << num1 << "-" << num2 << "= " << num1 - num2;}

       if(calc == 3){
           cout << endl << num1 << "x" << num2 << "= " << num1 * num2;}

       if(calc == 4){
           cout << endl << num1 << "/" << num2 << "= " << num1 / num2;}

   return(0);
}

Just started learning C++ about 7-8 hours ago.

  • 2 months later...
Posted
solved? add a [solved] in front of your thread's title and put a "solved" inside the tag box.

honestly, it's the last of my clipboard. keep continue~

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...