<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'executing programs in Turbo C++ "run" window' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'executing programs in Turbo C++ "run" window' posted on the 'Beginner C/C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Thu, 20 Jun 2013 03:32:53 -0700</pubDate>
    <lastBuildDate>Thu, 20 Jun 2013 03:32:53 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397636/executing-programs-in-turbo-c++-run-window/</link>
      <description>hi,&lt;br /&gt;
here is the program:&lt;br /&gt;
&lt;br /&gt;
/*file:avrage.c*/&lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* calculate the average of three numbers */&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
	int num1, num2, num3;&lt;br /&gt;
	float avg;&lt;br /&gt;
&lt;br /&gt;
	printf("enter 3 integer numbers:");&lt;br /&gt;
	scanf(" %d %d %d ", &amp;amp;num1, &amp;amp;num2, &amp;amp;num3);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	avg = num1+num2+num3;&lt;br /&gt;
&lt;br /&gt;
	avg = avg/3;&lt;br /&gt;
&lt;br /&gt;
	printf("the average is:%f",avg);&lt;br /&gt;
        &lt;br /&gt;
}&lt;br /&gt;
dumb question: what to do after i entered the numbers in TC++ "run" window? because pressing the "Enter" button does nothing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397636/executing-programs-in-turbo-c++-run-window/</guid>
      <pubDate>Tue, 15 Sep 2009 02:36:40 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397653/re-executing-programs-in-turbo-c++-run-window/#397653</link>
      <description>: hi,&lt;br /&gt;
: here is the program:&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: /*file:avrage.c*/
: #include&amp;lt;stdio.h&amp;gt;
: &lt;span style="color: Red;"&gt;#include&amp;lt;conio.h&amp;gt;&lt;/span&gt;
: 
: /* calculate the average of three numbers */
: void main()
: {
: 	int num1, num2, num3;
: 	float avg;
: 
: 	printf("enter 3 integer numbers:");
: 	scanf(" %d %d %d ", &amp;amp;num1, &amp;amp;num2, &amp;amp;num3);
: 
: 
: 	avg = num1+num2+num3;
: 
: 	avg = avg/3;
: 
: 	printf("the average is:%f",avg);
:         
: 	&lt;span style="color: Red;"&gt;getch();&lt;/span&gt;
: }
&lt;/pre&gt;&lt;br /&gt;
: dumb question: what to do after i entered the numbers in TC++ "run" &lt;br /&gt;
: window? because pressing the "Enter" button does nothing.&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397653/re-executing-programs-in-turbo-c++-run-window/#397653</guid>
      <pubDate>Tue, 15 Sep 2009 03:57:54 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397697/re-executing-programs-in-turbo-c++-run-window/#397697</link>
      <description>&lt;strong&gt;brilliant!!&lt;br /&gt;
thank you very much&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
2 basic questions:&lt;br /&gt;
&lt;br /&gt;
1)is there any function that will except hitting "Enter", and not an actual character to display the average? &lt;br /&gt;
&lt;br /&gt;
2)is there a way to &lt;strong&gt;clear&lt;/strong&gt; the "run" window, and the "user screen" window, without restarting Turbo C++ ?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397697/re-executing-programs-in-turbo-c++-run-window/#397697</guid>
      <pubDate>Tue, 15 Sep 2009 09:18:52 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397817/re-executing-programs-in-turbo-c++-run-window/#397817</link>
      <description>: &lt;strong&gt;brilliant!!&lt;br /&gt;
: thank you very much&lt;/strong&gt;&lt;br /&gt;
: &lt;br /&gt;
: 2 basic questions:&lt;br /&gt;
: &lt;br /&gt;
: 1)is there any function that will except hitting "Enter", and not an &lt;br /&gt;
: actual character to display the average? &lt;br /&gt;
: &lt;br /&gt;
: 2)is there a way to &lt;strong&gt;clear&lt;/strong&gt; the "run" window, and the "user &lt;br /&gt;
: screen" window, without restarting Turbo C++ ?&lt;br /&gt;
: &lt;br /&gt;
&lt;span style="color: Blue;"&gt;&lt;br /&gt;
Question #1 I am not sure I understand. Did you mistype 'accept'? What exactly you need to do? Also, the average displayed BEFORE you hitting any keys. Also, you can easily input ENTER instead of any other character - it will work the same way.&lt;br /&gt;
&lt;br /&gt;
Question #2.&lt;br /&gt;
&lt;br /&gt;
Simply call function clrscr() and it will clear the screen.&lt;br /&gt;
&lt;/span&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397817/re-executing-programs-in-turbo-c++-run-window/#397817</guid>
      <pubDate>Tue, 15 Sep 2009 16:46:16 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397847/re-executing-programs-in-turbo-c++-run-window/#397847</link>
      <description>1# yes sorry - i mistyped 'accept'.&lt;br /&gt;
and for me the average &lt;strong&gt;does not&lt;/strong&gt; display before i hit any keys. after i insert the numbers i must hit a letter key (doesn't matter which one) and then ENTER - only then will i see the average...&lt;br /&gt;
&lt;br /&gt;
2# - thanks - it worked &lt;img src="http://www.programmersheaven.com/images/Community/smile.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397847/re-executing-programs-in-turbo-c++-run-window/#397847</guid>
      <pubDate>Tue, 15 Sep 2009 23:34:24 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397867/re-executing-programs-in-turbo-c++-run-window/#397867</link>
      <description>&lt;span style="color: Blue;"&gt;Wow! You are correct!&lt;br /&gt;
I just tried this code on my TC 201 and indeed you need&lt;br /&gt;
to enter something before seeing the average value.&lt;br /&gt;
&lt;br /&gt;
I found the cause, however. &lt;img src="http://www.programmersheaven.com/images/Community/twink.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
The formatting string is " %d %d %d ".&lt;br /&gt;
Notice the blanks on both sides. Simply remove them.&lt;br /&gt;
The formatting string is now "%d %d %d". And the problem is gone!&lt;br /&gt;
It is most likely the bug in Turbo C itself.&lt;br /&gt;
I am not sure the C/C++ standard has anything to say about this behavior, so it is most likely a bug in TC. Well, it was long ago.&lt;br /&gt;
&lt;br /&gt;
I have added some colors to your program.&lt;br /&gt;
Have fun!&lt;/span&gt;&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
/*file:avrage.c*/

#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;conio.h&amp;gt;
#include &amp;lt;bios.h&amp;gt;

 /* calculate the average of three numbers */
 void main()
 {
 	int num1, num2, num3;
 	float avg;

	textcolor (WHITE);
	cprintf("\r\nenter 3 integer numbers: ");
	textcolor (LIGHTGREEN);
	cscanf("%d %d %d", &amp;amp;num1, &amp;amp;num2, &amp;amp;num3);


 	avg = num1+num2+num3;

 	avg = avg/3;

	textcolor (YELLOW);
	cprintf("\r\nthe average is:%f",avg);

	bioskey (0);
	textcolor (LIGHTGRAY);
 }
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: Blue;"&gt;If you want to know where all those functions come from - simply put cursor on a name of any function or constant, like YELLOW, and press CTRL+F1.&lt;/span&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397867/re-executing-programs-in-turbo-c++-run-window/#397867</guid>
      <pubDate>Wed, 16 Sep 2009 04:06:36 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397940/re-executing-programs-in-turbo-c++-run-window/#397940</link>
      <description>Awesome! It worked!&lt;br /&gt;
Nice debugging skills man &lt;img src="http://www.programmersheaven.com/images/Community/twink.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
And the &lt;span style="color: Blue;"&gt;c&lt;/span&gt;&lt;span style="color: Green;"&gt;o&lt;/span&gt;&lt;span style="color: Orange;"&gt;l&lt;/span&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="color: Red;"&gt;r&lt;/span&gt;&lt;span style="color: purple;"&gt;s&lt;/span&gt; are much better thank you...&lt;br /&gt;
&lt;br /&gt;
You've been a great help man. Much much appreciated &lt;img src="http://www.programmersheaven.com/images/Community/grin.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397940/re-executing-programs-in-turbo-c++-run-window/#397940</guid>
      <pubDate>Wed, 16 Sep 2009 09:09:28 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/397995/re-executing-programs-in-turbo-c++-run-window/#397995</link>
      <description>&lt;span style="color: Blue;"&gt;You can also do graphics programs and it will all work in Win XP DOS box. Here is how to discover functions for it:&lt;/span&gt;&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#include &amp;lt;graphics.h&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: Blue;"&gt;Then put a cursor on 'graphics.h' and press CTRL+F1 - it should give the list of functions in that header. Read on!&lt;/span&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/397995/re-executing-programs-in-turbo-c++-run-window/#397995</guid>
      <pubDate>Thu, 17 Sep 2009 03:08:32 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/398220/re-executing-programs-in-turbo-c++-run-window/#398220</link>
      <description>Thanks, right on it! &lt;img src="http://www.programmersheaven.com/images/Community/smile.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/398220/re-executing-programs-in-turbo-c++-run-window/#398220</guid>
      <pubDate>Thu, 17 Sep 2009 10:34:31 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: executing programs in Turbo C++ "run" window</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/398850/re-executing-programs-in-turbo-c++-run-window/#398850</link>
      <description>Please, put the code tags!&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/398850/re-executing-programs-in-turbo-c++-run-window/#398850</guid>
      <pubDate>Sun, 20 Sep 2009 17:22:53 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Gucci Mens Denim Jeans (Www.Edhardy4sale.Com)</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/397636/402536/gucci-mens-denim-jeans-wwwedhardy4salecom/#402536</link>
      <description>&lt;br /&gt;
Cheap Men Gucci Jackets (Www.Edhardy4sale.Com) Wholesale Gucci Men's Jackets (Www.Edhardy4sale.Com) Discount Gucci Jackets For Mens&lt;br /&gt;
&lt;br /&gt;
Coogi ED Hardy Urban Clothing (Www.Edhardy4sale.Com) Cheap Hip Hop Gucci Clothing Wholesale&lt;br /&gt;
&lt;br /&gt;
Gucci Womens Sandals (Www.Edhardy4sale.Com)&lt;br /&gt;
&lt;br /&gt;
Gucci Mens Denim Shorts (Www.Edhardy4sale.Com)&lt;br /&gt;
&lt;br /&gt;
Gucci Mens Denim Jeans (Www.Edhardy4sale.Com)&lt;br /&gt;
&lt;br /&gt;
Gucci Belts (Www.Edhardy4sale.Com)&lt;br /&gt;
&lt;br /&gt;
Gucci Mens Short Sleeve Tee Shirts (Www.Edhardy4sale.Com)&lt;br /&gt;
&lt;br /&gt;
Gucci Womens Short Sleeve Tees (Www.Edhardy4sale.Com)&lt;br /&gt;
&lt;br /&gt;
Gucci Women Short Sleeve Polo Shirts (Www.Edhardy4sale.Com)&lt;br /&gt;
&lt;br /&gt;
Gucci Short Sleeve Polos For Big Men (Www.Edhardy4sale.Com)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/397636/402536/gucci-mens-denim-jeans-wwwedhardy4salecom/#402536</guid>
      <pubDate>Wed, 07 Oct 2009 07:35:15 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
  </channel>
</rss>