Blame view

Giac_maj/giac-1.4.9/examples/codage/julescesar 346 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  c2n(m):={
  return(asc(m)-65);
  };
  n2c(l):={
  return(char((l)+65));
  };
  decal(n,l):={
  return(irem((l+n),26));
  };
  cesar(n,m):={
  return(n2c(decal(n,c2n(m))));
  };
  sym(n,l):={
  return(irem((n-l),26));
  };
  cesarsym(n,m):={
  return(n2c(sym(n,c2n(m))));
  };
  affine(a,b,l):={
  return(irem((a*l+b),26));
  };
  cesaraffine(a,b,m):={
  return(n2c(affine(a,b,c2n(m))));
  };