Pagini recente » Cod sursa (job #358369) | Cod sursa (job #1823832) | Cod sursa (job #454841) | Cod sursa (job #914564) | Cod sursa (job #1666815)
// test1.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include "stdio.h"
#include "fstream"
#include "iostream"
#include "string"
using namespace std;
void citire(int* x)
{
ifstream myfile;
myfile.open("fact.in");
myfile >> *x;
myfile.close();
}
void scriere(int x)
{
ofstream outfile;
outfile.open("fact.out");
outfile << x;
outfile.close();
}
int main()
{
int p;
int m2=0, m5=0, m10=0,i=1;
citire(&p);
// while(m10<p)
// {
// i++;
// if (i%2==-0) {
// m2++;
// }
// if ((i%5)==0) {
// m5++;
// }
// if ((m2>=1)&&(m5>=1)){
// m10++;
// m2=0;
// m5=0;
// };
// };
if (p==0) scriere(i=1);
else if (p==2) scriere(i=10);
else scriere(i=(p-1)*5);
// scriere(i);
return 0;
}