+ ShareSpark.net » :::: Study / Technical / Programming Section » Programming Languages (Discussions & Helpdesk)
|- [HELP]PROBLEM IN C++


Electroncs Sale

[HELP]PROBLEM IN C++

0 Members and 1 Guest are viewing this topic.

September 21, 2014, 05:00:38 PM
  • Junior Mod (Inactive)
  • Elite Forces
  • ***
  • Topic Author
  • Thank You: 383
  • Reputation: 287
  • Activity:
    0%
  • Country: in
  • Posts: 1106
  • Topics: 575
  • Join Date: Feb 2013
  • Learner
Quote
#include<iostream>
#include<conio.h>

using namespace std;

main()
{
   int a[4];

   cout<<"ENTER ANY NUMBER :->";
   for(int i=0;i<4;i++)
   {
   
   cin>>a;
}
for(int i=0;i<4;i++)
{

   cout<<"\nvalue of a is :-> \n"<<a;
   
   
   cout<<"\naddress of a is :->\n"<<&a;
   
}
   
   getch();

HOW CAN I RUN THIS PROGRAM AGAIN AND AGAIN WITHOUT CLOSING IT MEANS IN LOOP

WHEN PROGRAM IS RUN COMPLETELY IT CLOSED WHEN PRESSING SPACE BUT I WANT THAT IT ASKED ME TO START THE PROGRAM FROM BEGIN OR CLOSED IT

HOW CAN I  DO THAT..?  :cool:

Share this topic on FacebookShare this topic on GoogleShare this topic on MySpaceShare this topic on TwitterShare this topic on Yahoo




September 21, 2014, 05:13:04 PM
Reply #1
  • Team SSX
  • Royal Member
  • ***
  • Thank You: 162
  • Reputation: 144
  • Activity:
    0.2%
  • Country: in
  • Posts: 925
  • Topics: 196
  • Join Date: Nov 2011
  • ShareSpark Member
#include<stdio.h>
#include<iostream>
#include<conio.h>

using namespace std;

main()
{
int a;
while(1)
{
cout<<"\n\nenter a number =>";
cin>>a;
cout<<"\nnumber is =>"<<a<<"\naddress is =>"<<&a;
cout<<"\nenter 0 to exit.";
if(getch()=='0')
{cout<<"\n\n\nexiting.";break;}
else
continue;
}

getch();
}
« Last Edit: September 21, 2014, 05:21:55 PM by -Tushar- »
:bounce:
  :bounce:

September 21, 2014, 08:21:31 PM
Reply #2
  • Junior Mod (Inactive)
  • Elite Forces
  • ***
  • Topic Author
  • Thank You: 383
  • Reputation: 287
  • Activity:
    0%
  • Country: in
  • Posts: 1106
  • Topics: 575
  • Join Date: Feb 2013
  • Learner
tushar bro rep+ added :drunk:

October 31, 2015, 06:01:04 PM
Reply #3
  • Semi Newbie
  • **
  • Thank You: 0
  • Reputation: 0
  • Activity:
    0%
  • Posts: 5
  • Topics: 0
  • Join Date: Oct 2012
  • ShareSpark Member
Please provide me a link for c++ compiler i m using turbo c++ any better than this

November 09, 2015, 08:44:21 PM
Reply #4
  • Team SSX
  • Royal Member
  • ***
  • Thank You: 162
  • Reputation: 144
  • Activity:
    0.2%
  • Country: in
  • Posts: 925
  • Topics: 196
  • Join Date: Nov 2011
  • ShareSpark Member
Please provide me a link for c++ compiler i m using turbo c++ any better than this
Use Dev C++
:bounce:
  :bounce:

Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
628 Views
Last post November 24, 2014, 07:46:18 AM
by ♫♪ RΩCK BΩY ♥♫
1 Replies
1140 Views
Last post January 31, 2015, 09:46:52 PM
by bakra
3 Replies
1740 Views
Last post June 27, 2015, 10:56:33 AM
by gunjan10
0 Replies
837 Views
Last post December 13, 2015, 04:25:58 PM
by Rahul gawali dx
2 Replies
1594 Views
Last post October 29, 2016, 08:31:20 AM
by Rahul gawali dx




Back to top