×

# [closed] i want help in programming coding in c++

 0 1 i want rpogramming code for --> acceptive value from user and find out square of the no. in c++ asked 01 Jul '13, 17:19 0★rohya 11●2●3●6 accept rate: 0% 1.3k●3●10●25

### The question has been closed for the following reason "The question is answered, right answer was accepted" by sunny_patel 01 Jul '13, 20:17

 1 @rohya, what do you mean by "acceptive"? i think you want to accept a number from user and print square of that number isn't it? What difficulty are you facing? please elaborate so that you get better help :) But for now here's the c++ code: #include using namespace std; int main() { int a; cout<<"enter the number"; cin>>a; int square= a*a; cout<< "The square is: " << square; return 0; }  answered 01 Jul '13, 17:28 1.3k●3●10●25 accept rate: 19%
 2 Ok, so since you asked i just installed Borland c++(version 3.1) for the first time. important points to be noted: In Borland while using header files you must use .h extension. while, coding for online environments like codehcef or spoj never use .h extensions. You can not use "using namespace std" in Borland( I think) and here is your answer, working code for finding square in borland with ouput: Hope this helps! :) answered 01 Jul '13, 18:28 1.3k●3●10●25 accept rate: 19% Why on earth would you use Borland when you have Code Blocks and Visual Studio? :p (29 Jan '14, 21:07) vigonoid1★
 1 thank you so much bro.. :) :D will you be help me out with this question is : Accept number from user and find out cube of the number. this also i want to be run in borland .. plz try if you can.. answered 01 Jul '13, 18:37 0★rohya 11●2●3●6 accept rate: 0% @rohya well, now you can follow the code in the image. i'm sure it wont be difficult to make out that cube of number = aaa so you just need to add multiply the square one more time with "a" and you have the cube! (01 Jul '13, 18:40)
 0 this code will work in software borland c++? and yes it's accept not acceptive.. typing error. please just let me know is this code will work in software borland c++? answered 01 Jul '13, 17:47 0★rohya 11●2●3●6 accept rate: 0%
 0 i didnt got plz can you please show throught code answered 01 Jul '13, 18:42 0★rohya 11●2●3●6 accept rate: 0%
 0 In the above code: Replace:  int square= a * a;  with:  int cube= a * a * a;  everything else remains the same. answered 01 Jul '13, 19:12 1.3k●3●10●25 accept rate: 19%
 0 ya image one only used in borland but showing thi error #include void main() { int a; cout<<"enter the number"<>a; int cube; cube=a*a*a; cout<<"The cube of the number is: " << cube; }  output: Line 2: error: '::main' must return 'int' answered 01 Jul '13, 19:49 0★rohya 11●2●3●6 accept rate: 0% 4★kunal361 6.0k●13●32●72

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,886
×1,465
×1,329
×1,253
×916
×243

question asked: 01 Jul '13, 17:19

question was seen: 2,888 times

last updated: 29 Jan '14, 21:07