Advertisements

Pow, sqrt, functions C++

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
  
   float num1, num2, num3; // setting variables
  
  
    
   num1 = num2 = num3 = 3;//assigning variables
   num1 = pow(num1, 5.0); //15  //#3’s
   num1 /= num2;//modifgying the result to number5 //#5’s
   num1 = sqrt(num1);//25  
   num3 = num1 + num1 + num1 + num1; //100
   num2 = num1 + num1 + num2 + num2 + num2 + num2;//62
  

   cout << num1 << endl;//25
   cout << num2 << endl;//62
   cout << num3 << endl;//100
 
  
    
  
   system(“pause”);
   return 0;

}

Advertisements

About Rant4u

A Revolution in Social Networking

Posted on March 2, 2012, in #basic c++, #functions, #rant-4u. Bookmark the permalink. Leave a comment.

Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: