#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream.h>
int main(int argc ,char *argv[],char *envp[])
{
char temp[10];
char *nb1;
char *nb2;
int nbr1,nbr2,tot;
nbr1=0;
nbr2=0;
tot=0;
if (argc < 2)
{
cout << "Il n'y a pas asser de parametre" << endl;
return -1;
}
if (strcmp(argv[1], "2" ) == 0)
{
strcpy(temp,argv[2]);
for (int i=0;temp[i]!='0';i++)
{
if (temp[i]=='*')
{
nb1 = &(temp[i-1]);
nbr1=atoi(nb1);
nb2 = &(temp[i+1]);
nbr2=atoi(nb2);
tot=nbr1*nbr2;
cout << tot << endl;
}
}
}
else
{
cout << "Numero correspond pas(1 ou 2 ou 3)" << endl;
}
return 0;
}