can someone help write a simple c++ code that inputs a file and decrypts it using ascii code -4.
#include <iostream> #include <fstream> #include <string> using namespace std; int main() { string fileName; cout << "Enter file name: "; cin >> fileName; ifstream in(fileName.c_str()); if(in.is_open()) { string line, result; while (getline(in, line)) { for (int i = 0; i < line.size(); ++i) { result += (char)(line[i]-4); } cout << result << endl; } in.close(); } else { cout << fileName << " does not exists!" << endl; } return 0; }
can someone help write a simple c++ code that inputs a file and decrypts it using...
Needs to be written in C: Write a Caesar Cipher that decrypts a message from ' ' (Space, ASCII 32) to '~' (tilde, ASCII 126).
Can anyone help me make a simple maze using C++? Not an actual game just a maze. I'm learning the basics of C++ and I'm already stumped. I basically need C++ code to create a simple 32x32 ascii portrait of a maze. Please if anyone is a C++ I need some help thank you!
C++ Can someone please help me with this problem- commenting each line of code so I can understand how to solve this problem using the C++ programming language? I really need help understanding how to create a file for the program to read. Do I create the file in Visual basic or create a text file? I have the code, just need to know how to create the file for it to read. #include<fstream> #include<iostream> using namespace std; int main()...
Write a C++ code to make a simple program that imports the input
file in and gets the results as specified
Please follow the instructions and paste the code below as the
answer with a screenshot of the output to prove it worked.
Input file ->
https://www.dropbox.com/s/444jofkchu6ylwr/names.txt?dl=0
Scoring Names You will be using the provided names.txt file, text file containing over five-thousand first names, and you will calculate a score for each name. Begin by reading the names from the...
Write a C++ program that reads text from a file and encrypts the file by adding 6 to the ASCII value of each character. See section 5.11 in Starting out with C++ for information on reading and writing to text files. Your program should: 1. Read the provided plain.txt file one line at a time. Because this file has spaces, use getline (see section 3.8). 2. Change each character of the string by adding 6 to it. 3. Write the...
Can someone show the code to make a simple popup window that says "Hello World!" in C++?
Write a simple C language code using MPLABX IDE that explains an operation then rewrite the same Code but using assembler code language and explain how the codes work.
Can someone help me write a C++ program such that: 1. It counts the number of alphabetic characters in a text file; this mean it ignores any character that is not alphabetic 2. Prompts the user to write the name of the file 3. Count's the number of A's, B's, C's, ..and so on For the sake of this program, both capital 'A' and lowercase 'a' and treated as equal. An output would something like this "A's = 10 B's...
Need a simple C++ code that read a text file of integers, puts the integers in a array and using quick sort, sorts the numbers.
Can someone help me figure out how to write code on Matlab for
either of these two questions? My biggest problem is working with
the large factorials which Matlab can't seem to handle
1. Write a code to calculate nas a function of ga, when NA l300, 600, 3000, 6000, NB (200, 400, 2000, 4000), and g 100, plot them and try to find some tendency when N increases (hint: 4 plots). 2. Write a code to calculate the probability...