All pastes #346479 Raw Edit

Unnamed

public cpp v1 · immutable
·published 2007-02-09 12:15 UTC
rendered paste body
// Console App.cpp : Defines the entry point for the console application.//#include "stdafx.h"// our main header!#include <iostream>//this contains the namspace with the functions that we use to print text to the console!bool loop = true;// while this value remains true the main loop will keep loopingint mult(int x, int y); //whenever we create a function we always place the prototype at the topint main()//this is the main function the program always starts here!{		mult(2,2);//here we are using the mult function we are multiplying 2 x 2		std::cin.get();//this nifty function waits on the user to press the ENTER key before the window closes}int mult(int x/*this will be a variable to store the number you want to multiply with*/, int y/* same here with y*/){	int a;// this variable hold the answer to the multiplication	a = x * y;// right here we are basically saying (a) will equal x x y! example: a equals 2 x 2 	std::cout<<a;// this will print the value of (a) into the console!	return 0;// dont worry about this yet}