Noobie on c++ needs some help?
Hey guys so I just started a class in school for c++..We have barely learned anything and I just want to get some practice..I am trying to make a little program that when I enter a number it comes our squared..so if I put 5..Id get 25..I am very noobie in c++ and barely know any of the code so this is what ive kind of had so far..

    #include "stdafx.h"
    
    using namespace std;
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	//any number squared
    	int a, max;
    	
    	cout << "enter # u want ^2: "; 
    	cin >> a;
    	if (a<0)
    		max = a * a;
    	else 
    		max = a * a;
    	cout << "answer is: " << max << "\n";

**I know the logic is ultimately noobie but I have no knowledge of the language so I really dont have an idea of what how code this

thanks

Noobie on c++ needs some help?
===

Hey guys so I just started a class in school for c++..We have barely learned anything and I just want to get some practice..I am trying to make a little program that when I enter a number it comes our squared..so if I put 5..Id get 25..I am very noobie in c++ and barely know any of the code so this is what ive kind of had so far..

    #include "stdafx.h"
    
    using namespace std;
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	//any number squared
    	int a, max;
    	
    	cout << "enter # u want ^2: "; 
    	cin >> a;
    	if (a<0)
    		max = a * a;
    	else 
    		max = a * a;
    	cout << "answer is: " << max << "\n";

**I know the logic is ultimately noobie but I have no knowledge of the language so I really dont have an idea of what how code this

thanks
