Corrected Version.

Q19. Write the corrected version of program mentioned in problem 18.

Ans.

#include<iostream.h>

#include<conio.h>    //for clrscr()

int main()

{

clrscr(); //for clear screen

int var,sqrs;

cout<<“Enter variables:”;

cin>>var;

sqrs=var*var;

cout<<“\n”<<“The square is: “<<sqrs;

return 0;

}

Leave a Reply

Your email address will not be published. Required fields are marked *

5 Views
%d bloggers like this: