Answer to Question #27541 in Programming & Computer Science for Charlie Kirkpatrick

Question #27541
Hello. I am writing a program in C++ using loops, conditionals, and file processing concepts. I wonder if you could show a pseudocode example representing such a program. This will help me visualize the basic structure of what the completed program will look like. Thank you in advance.

Best Regards,
Charlie
1
Expert's answer
2013-04-10T10:54:29-0400
program start;
int i;& #define a int variable
file f; #define a file variable
f = fopen('example.txt','w'); #open file for writing
for(i = 0;i<30;i++)& #& loop [0;30]
{
if(i mod 3 == 0) # condition: every number the divides into three parts without remainder
{
fwrite(f,i); #writing result to file
fwrite(f,' ');& #separated by space
}
}
fclose(f); #closing file
program end.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS