Hi,

I created a program that makes a multiplication table, I dont know where the .txt file is located after executing the program

Im using turbo C++ :-/

#include<iostream.h>
#include<stdio.h>


void main(){

int multiplicand;
int multiplier;
int toprow;
int column;
int repeater;


FILE* Starter=fopen("multiplication.txt","w");


cout<<"Insert the number of repetitions: ";
cin>>repeater;

for(multiplicand=1, toprow=4; multiplicand<=repeater; multiplicand++, toprow=toprow+4){

gotoxy(toprow,10);
fprintf(Starter,"%d",multiplicand);
}

for(multiplicand=1, column=11; multiplicand<=repeater; multiplicand++,column++){
gotoxy(1,column);
fprintf(Starter,"%d",multiplicand);

for(multiplier=1, toprow=4; multiplier<=repeater; multiplier++, toprow=toprow+4){
gotoxy(toprow,column);
cout<<multiplier*multiplicand;
fprintf(Starter,"d",multiplier*multiplicand);
}

}

fclose(Starter);
}

Recommended Answers

All 2 Replies

It's probably in the same location as the .exe file. Either go to the directory into which you started the project or use Window's search utility to find it (you may have to expand the search area to include more than your documents, etc.).

thanks, I found the .txt file

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.