#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,tcnt,scnt=3;
clrscr();
for(i = 1;i<=8;i*=2)
{
tcnt=scnt;
Type: Posts; User: --]bthNzA
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,tcnt,scnt=3;
clrscr();
for(i = 1;i<=8;i*=2)
{
tcnt=scnt;
Oh well,I forgot to tell you how this code works on Turbo C++ 3.0.For the first run,it has the off by one error,from the second run onwards,its okay,now,after adding the extra tab,it runs perfectly...
I use Turbo C++ 3.0 and M$ VC++ 6.0.I'm fairly new to proper programming[been much of a code-reader and understand things like that...]so it will take some time to get to the finer points,but thanks...
When I run the code in M$VC++ the "1" in the first row is off by one tabspace,when I run the same in Turbo C++ its okay,would you mind checking if that happens with your computer as well?
~M~
I knew what tcnt and scnt were meant to do,just didn't know how you got those names :)
~M~
Hey,just curious...what were you thinking....tcnt,scnt.....don't bite my head off...its 1:21AM...and I've nothing to do..sleeping is an option but.....
~M~ :-)
tcnt,scnt
I was not thinking about the tabs problem now,just wanted the loops to work right...thanks anyway.
Merry Christmas to you...
~M~:cool:
/* What's wrong with the damn code?I just gives endless zeros,I want
the output to be something like this -
1
1 2 1
1 2 4 2 1
1 2 4 8 4 2 1
Its driving me crazy!
*/