Jump to content

Aztec

Member
  • Content count

    364
  • Joined

  • Last visited

Awards


This user doesn't have any awards

About Aztec

  • Title
    Member

Profile Information

Recent Profile Visitors

825 profile views
  1. Trying to do cipher decryption using C

    Thank you. I've got a code that detects the letters and then one that shuttle sorts them and then the decrypt. I'm fairly new to C language as you can probs tell haha.
  2. Hi, I'm trying to decrypt a ".txt" file using C language (cipher method). I keep getting loads of errors during compiling. Can someone please help me? Thanks! Code: #include<stdio.h> #include<stdlib.h> #define MAX_SIZE 256 int main(int argc, char *argv[]) { *argv=[1], argv=[2]); FILE *in_file, out_file; in_file= fopen(argv[1], "r"); out_file= fopen(argv[2], "w"); void counter() char str[MAX_SIZE]; int i, len; int freq[26]; gets(%i); len = strlen(str); for(i=0; i<26; i++) { freq = 0; } for(i=0; i<len; i++) { if(str>='a' && str<='z') { freq[str - 97]++; } else if(str>='A' && str<='Z') { freq[str - 65]++; } } char data[50], temp; int key, count; void shuttleSort(int a[], int n) { int i = 1, j; int temp; while (i < n) { j = i - 1; while (j >= 0) { if (a[j] > a[j + 1]) { temp = a[j]; a[j] = a[j + 1]; a[j + 1] = temp; j--; } else { break; } } i++; } printf("\n"); printf("\nThe sorted array elements are given below\n"); for (i = 0; i < n; i++) { printf("a[%d]=%d ", i, a); } } void shuttle sort int i, n = 6; int a[] = {15, 8, 17, 12, 38, 19}; printf("\n:: Shuttle Sort ::\n"); printf("\nInput array elements\n"); for (i = 0; i < n; i++) { printf("a[%d]=%d ", i, a); } void caesar_cipher_decryption() { for(count = 0; data[count] != '\0'; count++) { temp = data[count]; if(temp >= 'a' && temp <= 'z') { temp = temp - key; if(temp < 'a') { temp = temp + 'z' - 'a' + 1; } data[count] = temp; } else if(temp >= 'A' && temp <= 'Z') { temp = temp - key; if(temp < 'A') { temp = temp + 'Z' - 'A' + 1; } data[count] = temp; } } printf("\nDecrypted Message:\t%s\n", data); }
  3. Nope, everything is fine now I was over reacting! Did a secure erase of the drive. It was something weird.
  4. wait, nope, it ins't haha, I was over reacting. everything is working fine now
  5. That doesn't do anything as well plus I've looked in control panel and this is a fresh copy of Windows 8.1. just installed it 1 hour ago.
  6. Hi, Nope I don't believe I have and Alt+Shift doesn't do anything. I've even tried another keyboard as well.
  7. Hi, I was playing Battlefield One untill all of a sudden my keyboard was mapping weird characters to the wrong keys. I've reformatted my PC and the problem is still happening. My keyboard works for a little bit and then all of a sudden it maps totally different keys or something. the "windows" key doesn't work, numbers become different symbols such as "£%*"$" I've even did a CMOS reset and upgraded the BIOS to the latest version. I've checked simple stuff such as "caps lock" etc...
  8. Hey, I'm trying to do a Hackintosh but the problem is that when I go into disk manager partition my SSD, boot into the mac installer and try and reformat it it won't allow me to reformat the partition to Mac OS X Journaled. The problem is that I don't want to loose my Windows 10 as it was a pain to install and get everything up and running. I have created a system image on a separate drive incase worse comes to worst. There must be a way to install Mac on the same SSD without reformatting the drive and keeping my Windows 10 OS. Thank you!
  9. Ahh right. I think that could be the case. I'll get a replacement. Thank you
  10. Hi, if I remove the cable from the hub the fan still spins but doesn't light up and if I put the cable in the 3rd slot or any other slot, it just turns dim red and doesn't spin as fast.
  11. Hey I've bought an extension SP120 RGB fan but it won't change colour. It just stays white. Here's the setup in the photos. Thank you.
  12. New Ryzen System won't post

    Thanks and I've learned quite a few lessons when building this PC but that's just the joys of building a PC instead of just buying one!
  13. New Ryzen System won't post

    Fixed it! Ram was in the wrong slots.... *face palm*
  14. New Ryzen System won't post

    There's nothing I can do about that.
×