Skip to content

Instantly share code, notes, and snippets.

@MaSven
Created July 11, 2016 21:46
Show Gist options
  • Save MaSven/3dd14a17e942a135da6c00b60609f4bf to your computer and use it in GitHub Desktop.
Save MaSven/3dd14a17e942a135da6c00b60609f4bf to your computer and use it in GitHub Desktop.
C-Code für Edurad
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int main (void)
{
char a [10000];
char b [10000];
int c, i, d;
printf("Geben Sie Ihren Text ein:");
fgets(a, 10000, stdin);
d=strlen(a);
printf("Geben Sie Ihren versatz ein:");
scanf("%d", &c);
printf("Ihre Verschlüsselung lautet:\n");
for (i=0; i<=d; i++)
{
b[i]=a[i]+(c%127);
printf("%c", b[i]);
}
getchar();
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int c, i, d;
int main (void)
{
char a [10000];
int b [10000];
printf("Geben Sie Ihren Text ein:");
fgets(a, 10000, stdin);
d=strlen(a);
pritf("Geben Sie Ihren versatz ein:");
scanf("%d", &c);
printf("Ihre Verschlüsselung lautet:\n");
for (i=0; i<=d; i++)
{
b[i]=a[i]+(c%127);
printf("%c", b[i]);
}
getch();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment