CodeDump
Add
Browse
Sign up
Sign in
Select language
ActionScript
Ajax
Android
AngularJS
Apache Configuration
AppleScript
ASP.NET (C#)
AutoHotkey
Bash
Brainfuck
C
C#
C++
CoffeeScript
CSS
CSS Extras
Dart
Eiffel
Erlang
F#
Fortran
Gherkin
Git
Go
Groovy
Haml
Handlebars
Haskell
HTML
HTTP
Ini
iOS
Jade
Java
Javascript
jQuery
JSON
Julia
Keyman
LaTeX
Linux
Less
LOLCODE
Makefile
Markdown
MATLAB
MySQL
NASM
Node.js
NSIS
Objective-C
Pascal
Perl
PHP
PHP Extras
PowerShell
Python
R
React JSX
reST (reStructuredText)
Rip
Ruby
Rust
SAS
Sass (Sass)
Sass (Scss)
Scala
Scheme
Smalltalk
Smarty
SQL
Stylus
Swift
Twig
TypeScript
Vb.net
VHDL
Wiki markup
YAML
Other
Search
You're not signedin! You can't edit or track the code you're going to add. If you want to maintain and track your code, you need to
signin
or
signup
.
We improved our code engine! From now on you can add more then just one peace of code! Use the "
Add more code
" button to add more code".
Add Codedump
Description (Markdown supported)
Title or filename
Language
Choose language
ActionScript
Ajax
Android
AngularJS
Apache Configuration
AppleScript
ASP.NET (C#)
AutoHotkey
Bash
Brainfuck
C
C#
C++
CoffeeScript
CSS
CSS Extras
Dart
Eiffel
Erlang
F#
Fortran
Gherkin
Git
Go
Groovy
Haml
Handlebars
Haskell
HTML
HTTP
Ini
iOS
Jade
Java
Javascript
jQuery
JSON
Julia
Keyman
LaTeX
Linux
Less
LOLCODE
Makefile
Markdown
MATLAB
MySQL
NASM
Node.js
NSIS
Objective-C
Pascal
Perl
PHP
PHP Extras
PowerShell
Python
R
React JSX
reST (reStructuredText)
Rip
Ruby
Rust
SAS
Sass (Sass)
Sass (Scss)
Scala
Scheme
Smalltalk
Smarty
SQL
Stylus
Swift
Twig
TypeScript
Vb.net
VHDL
Wiki markup
YAML
Other
Code
#include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> int main (int argc, string argv[]){ ///turn command line string into int/// int s = atoi(argv[1]); //return error message for no command line arg/// if (argc!=2) { printf("Error: No command line argument\n"); return 1; } //prompt user for plaintext// printf("Enter plaintext: "); string p = get_string(); //print loop for ciphertext// printf("ciphertext: "); int n = strlen(p); for (int i=0; i<n; i++) { //if char is alphabetical inner loops preserve case// if (isalpha(p[i])) { if (isupper(p[i])) { char l = (p[i]-65) + s%26; printf("%c", l+65); } if (islower(p[i])) { char m = (p[i]-97) + s%26; printf("%c", m+97); } } ///if not a letter, prints as is// if (isalpha(p[i]) == false) { printf("%c", p[i]); } } ///print new line after ciphertext/// printf("\n"); printf("argv1 is %i\n", s); }
Access
Everyone
Just me
Create