#include <iostream.h>
#include <fstream.h>
#include <stdio.h>
void writeinfile(int n);
void main()
{
int x,y,n;
x=25,y=10;
/**********Program**********/
n=x%y;
while(n)
{
x=y;
y=n;
n=x%y;
}
/********** End **********/
cout<<y;
writeinfile(y);
}
void writeinfile(int n)
{
fstream myfile;
myfile.open(" f.txt" ,ios::out);
myfile<<n<<endl;
myfile.close();
}
#include <iostream.h>
#include <fstream.h>
#include <stdio.h>
void writeinfile(int n);
void main()
{
int n,k,m,l,sum=0;
n=100;
/**********Program**********/
for(k=2;k<=n;k++)
{
l=1;
for(m=2;m<k;m++)
{
if(k%m==0)
l=0;
}
if(l!=0)
sum+=k;
}
cout<<sum;
/********** End **********/
writeinfile(sum);
}
void writeinfile(int n)
{
fstream myfile;
myfile.open(" f.txt" ,ios::out);
myfile<<n<<endl;
myfile.close();
}