[Newbie here]
Need to write a simple declaration program w/c apply the substitution method.

substitution table is:
*-a
$-e
/-i
+-o
--u

sample outputs ENCRYPTED MESSAGE:
m$$t m$ *t 9:00*m /n th$ p*rk

DECRYPTED MESSAGE should be: meet me at 9:00am in the park

MY PROGRAM:


[#include<stdio.h>
main()
{
char c;
clrscr();
printf("\n Encrypted Message:");
scanf("%c",&c);
printf("\n Decrypted Message:");
if(c=='*')
printf("a");
else if(c=='$')
printf("e");
else if(c=='/')
printf("i");
else if(c=='+')
printf("o");
else if(c=='-')
printf("u");
else
printf("Code Error");
getch();
}]

The output is always Code Error.

Caleb here. Guide me pls.

Okay Caleb, or Claire, or whoever the hell you claim to be, let's keep IDENTICAL FREAKING QUESTIONS to a single thread, mkay?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.