Contact Learn C
Copy Program Share Program

Program 228: Decryption of Latin Alphabet Cipher in C

Program 228
 
#include<stdio.h>
main()
{
//In this A-1,B-2....Z-26
//a-1,b-2,...z-26
 int i,n;
 printf("Enter how many numbers are there including spaces\n");
 scanf("%d",&n);
 int decrypt[n];
 printf("Enter numbers separated by space and if space is there in between words enter -1\n");
 for(i=0;i<n;i++)
 {
  scanf("%d",&decrypt[i]);
 }
 printf("Decrypted Code using Latin Alphabet\n");
 for(i=0;i<n;i++)
 {
  if(decrypt[i]!=-1)
  {
     printf("%c",decrypt[i]+'A'-1);   
  }
  else
  {
   printf(" ");
  }

 }
  printf("\n");
 
}
Explanation:
//Coming Soon

Output: 
Decryption of Latin Alphabet Cipher in C







 

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide