Commit fb76482a by raliis

Replace krypto.c

parent 28271caa
Showing with 9 additions and 2 deletions
/**
* File: krypto2.c
* File: krypto.c
* Author: Rainer Liis
* Created: 29.01.2018
* Last edit: 31.01.2018
......@@ -72,6 +72,10 @@ void encrypt ()
break;
}
if (c == 32) // if c is space
{
caesar = 32;
}
if (c >= 65 && c <= 90) // if char is uppercase
{
if ((c + key) > 90)
......@@ -128,6 +132,10 @@ void decrypt ()
break;
}
if (c == 32)
{
caesar = 32; // if c is space
}
if (c >= 65 && c <= 90) // if char is uppercase
{
if ((c - key) < 65)
......@@ -158,4 +166,3 @@ void decrypt ()
printf (" \n");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment