#include<iostream>
#include<fstream>
#include<cctype>
using namespace std;
main()
{
int j=0;
char a[100];
fstream i;
i.open("FILE.txt",ios::in );
while(i)
{
i.get(a[j]);
a[j]=toupper(a[j]);
j++;
}
a[j-1]='\0';
cout<<a;
i.close();
i.open("FILE.txt",ios::out);
j=0;
while(a[j]!='\0')
{
i.put(a[j++]);
}
i.close();
}
#include<fstream>
#include<cctype>
using namespace std;
main()
{
int j=0;
char a[100];
fstream i;
i.open("FILE.txt",ios::in );
while(i)
{
i.get(a[j]);
a[j]=toupper(a[j]);
j++;
}
a[j-1]='\0';
cout<<a;
i.close();
i.open("FILE.txt",ios::out);
j=0;
while(a[j]!='\0')
{
i.put(a[j++]);
}
i.close();
}
No comments:
Post a Comment