First one is :
takes a string from input in the format <integer1><operation><integer2> and prints an integer result based on the operation as follows (example i/o in parentheses):
a: the sum plus six (input: 2a3 output: 11)
b: twice the sum (input: 2b3 output: 10)
c: 100 minus the product (input: 2c3 output: 94)
And also this program needs to be easy to add new operations as the need arises, possibly hundreds of them.
Second :
program that can be used to verify that a message that ran through the program on one computer has not been altered in transit to another computer which uses the same program. I finished code the mode of transit - But I can't figure that a program to guarantee that a message has not changed between its generation and its reception.
Can anyone help me with these 2 problems?
Thanks.
1 reply to this topic
#1
Posted 11 November 2010 - 06:50 AM
|
|
|
#2
Posted 19 November 2010 - 12:32 PM
Hello!
Problem nr. 1:
Problem nr. 1:
string x = (5 + 5).ToString(); //same for other operationsAs for your second problem, there is a class called FileInfo that can help you. You can check with it when is the last time when the file has been modified.
FileInfo v = new FileInfo("C:\\file.txt");
I am not sure what was the exact code to check for when it was last modified, but you can search for it in the MSDN reference library.
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









