Home » Ask & Discuss » Board Exams - CBSE, ICSE, State Boards » Computer Science « Back to Discussion



Computer Science

Ayush's Avatar
Cool goIITian

Joined: 7 Sep 2008
Post: 91
28 Mar 2009 16:18:13 IST
0 People liked this
14
895 View Post
C++ program
None

hey i have written the program for c++ but im not getting how to see the output


Share this article on:

Comments (14)


Cool goIITian

Joined: 11 Dec 2008
Posts: 46
29 Mar 2009 10:55:03 IST
0 people liked this

give the command getch(); then compile and run
aparna ravi's Avatar

Cool goIITian

Joined: 22 Mar 2007
Posts: 63
13 Apr 2009 08:48:40 IST
0 people liked this

change the operator sign to <<

ricky's Avatar

Hot goIITian

Joined: 20 Jan 2007
Posts: 103
13 Apr 2009 08:54:46 IST
0 people liked this

Firstly write the header file -------#include<conio.h> and then write command getch(); before the last bracket } and then compile and run


New kid on the Block

Joined: 10 Apr 2009
Posts: 3
14 Apr 2009 07:48:13 IST
2 people liked this

change the last before line as,cout<<"hello" ;
poornima's Avatar

Cool goIITian

Joined: 27 Dec 2008
Posts: 79
14 Apr 2009 07:50:47 IST
0 people liked this

replace >> by <<.add ; after return 0.
suppandi's Avatar

Blazing goIITian

Joined: 12 Feb 2009
Posts: 598
14 Apr 2009 08:00:18 IST
0 people liked this

hey could you tell me how you posted the whole window here? please

RyuAmakusa's Avatar

Blazing goIITian

Joined: 21 Mar 2008
Posts: 776
14 Apr 2009 13:15:48 IST
0 people liked this

he might have used printscreen and pasted in paint or somethin.......

Blazing goIITian

Joined: 10 Apr 2009
Posts: 466
14 Apr 2009 13:18:33 IST
1 people liked this

1.change header file to not iostream only2.press ctrl+f93.press alt+f5

Cool goIITian

Joined: 22 Feb 2008
Posts: 41
15 Apr 2009 18:31:04 IST
0 people liked this

The corrected c++ program is

#include <iostream.h>

using namespace std;

int main()

{

cout<<"hello";    see this << sign you have written >>

return (0);     put a semicolon after (0)

}

Try to find out the run command in debug menu

taran's Avatar

Blazing goIITian

Joined: 17 Nov 2008
Posts: 1331
18 Apr 2009 16:48:06 IST
0 people liked this

hey u r using visual c++ i guess the turbo version is better just pressing alt f9 to compile n ctrl f9 to run

Vikram Saxena's Avatar

Forum Expert
Joined: 1 Apr 2007
Posts: 3732
22 Apr 2009 05:29:49 IST
0 people liked this

#include <iostream.h>

#include <conio.h>

using namespace std;

int main()

{

cout<<"hello"; 

return (0);

Getch();

}


Cool goIITian

Joined: 20 Apr 2009
Posts: 38
27 Apr 2009 16:52:58 IST
0 people liked this

change the header file to <iostream.h>. Add another header file <conio.h>.  ">>" should be replaced by  "<<".Replace int main by void main and return 0 by getch() .

 

Nitish_born 2day's Avatar

Blazing goIITian

Joined: 18 Mar 2009
Posts: 764
9 May 2009 09:03:12 IST
0 people liked this

change the last before line as,cout<<"hello" ;
pankaj's Avatar

Cool goIITian

Joined: 11 May 2009
Posts: 43
11 May 2009 11:59:29 IST
1 people liked this

use output operator << instead of >>



Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Find Posts by Topics

Physics.

Topics

Mathematics.

Chemistry.

Biology

Parents

Board

Fun Zone

Sponsored Ads