68 382
Assignments Done
Successfully Done
In November 2018

Answer to Question #55812 in C++ for Dharvin

Question #55812
Write a functions named sqrIt() that computes the square of the value passed to it and displays the result. The function would be capable of squaring numbers with decimal points. Make sure your function is called from main().
Expert's answer
#include <iostream>
using namespace std;
int squareIT(int n);

int main(){
for(int i=1;i<10;i++)
cout<<"i= "<<i<<" "<<"i^2 = "<<squareIT(i)<<endl;
return 0;
int squareIT(int n){
return n*n;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions