0

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);
}

Edited by Nick Evan: Added CODE-tags

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by bawbawbiscuit
0

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.).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.