<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Calculatrice
{
    class Program
    {
        static void Main(string[] args)
        {
            string line1 = Console.ReadLine();
            string line2 = Console.ReadLine();
            string line3 = Console.ReadLine();
            
            int value1 = int.Parse(line1);
            int value2 = int.Parse(line3);

            if (line2 == "+")
            {
                Addition add = new Addition();
                double result = add.DoOperation(value1, value2);
                Console.WriteLine(result);
            }
            else if (line2 == "-")
            {
                Soustraction sous = new Soustraction();
                double result = sous.DoOperation(value1, value2);
                Console.WriteLine(result);
            }
            Console.ReadLine();
        }
    }
    
    public class Addition
    {
        public double DoOperation(double a, double b)
        {
            return a + b;
        }
    }

    public class Soustraction
    {
        public double DoOperation(double a, double b)
        {
            return a - b;
        }
    }

    public class Multiplication
    {
        public double DoOperation(double a, double b)
        {
            return a * b;
        }
    }

    public class Division
    {
        public double DoOperation(double a, double b)
        {
            return a / b;
        }
    }
}<commit_msg>Update calc code content<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Calculatrice
{
    class Program
    {
        static void Main(string[] args)
        {
            double value1 = 0;
            double value2 = 0;
            string line1 = "";
            string line2 = "";
            string line3 = "";

            bool tf = true;
            while (tf)
            {
                line1 = Console.ReadLine();
                // Traitement pour gérer la saisie sur une ligne :
                if (line1.Contains("+"))
                {
                    string[] line = line1.Split('+');
                    line1 = line[0];
                    line2 = "+";
                    line3 = line[1];
                }
                // TODO : Ajouter ici le traitement pour les autres opérations :

                // Lancement des calculs :
                try
                {
                    value1 = double.Parse(line1);
                    value2 = double.Parse(line3);

                    if (line2 != "+" && line2 != "-")
                        throw new InvalidOperationException();

                    tf = false;
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Données invalides");
                }
            }
            if (line2 == "+")
            {
                Addition add = new Addition();
                double result = add.DoOperation(value1, value2);
                Console.WriteLine(result);
            }
            else if (line2 == "-")
            {
                Soustraction sous = new Soustraction();
                double result = sous.DoOperation(value1, value2);
                Console.WriteLine(result);
            }

            Console.ReadLine();
        }
    }

    public class Addition
    {
        public double DoOperation(double a, double b)
        {
            return a + b;
        }
    }

    public class Soustraction
    {
        public double DoOperation(double a, double b)
        {
            return a - b;
        }
    }
}
{'fraction_non_alphanumeric': 0.09134873723804406, 'fraction_numerical': 0.010746910263299301, 'mean_word_length': 1.1582608695652175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '225887', 'n_tokens_mistral': 968, 'n_tokens_neox': 916, 'n_words': 241}