0% found this document useful (0 votes)
53 views1 page

Exam PDF

This C++ program opens a file called "output.txt" for writing, then uses a for loop to print the numbers from 1 to 50 million separated by spaces to that output file. It includes the standard C++ header files and defines long long for large integer values.

Uploaded by

Prateek Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views1 page

Exam PDF

This C++ program opens a file called "output.txt" for writing, then uses a for loop to print the numbers from 1 to 50 million separated by spaces to that output file. It includes the standard C++ header files and defines long long for large integer values.

Uploaded by

Prateek Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

#include<bits/stdc++.

h>

using namespace std;

#define ll long long

signed main()

freopen("output.txt","w",stdout);

ll i,j,k;

for(i=1;i<=50000000;i++)

cout << i << " ";

cout << endl;

You might also like