Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
How do i convert this code to c#?I am new to programming.
Nikhil Gurung
Nov 3 2014 3:04 PM
877
Reply
I wanted to start programming and know how it works in both pseudocode and c#
String carName;
String carPlate;
int i, j;
for (i = 0;i < size of carPark; i = i+1
for int b = 0;i < 2; b = b+1
carPark[i][b] = "empty";
// When guest comes
carName = Userinputs name;
carPlate = User inputs plate;
for int i = 0, i< size of carPark; i = i+1
for int b = 0; b<2; b= b+1
if carPark[i][b] ==/equals to "empty"
carPark[i][b] = carName;
carPlate[i][b+1] = carPlate;
return "Car has bee placed at space " + i
return "No empty spaces left"
// When guest leaves
for int i = 0, i< size of carPark; i = i+1
for int b = 0; b<2; b= b+1
if carPark[i][b] ==/equals to carName
carPark[i][b] = "empty"
carPark[i][b+1] = "empty"
return "Car has bee placed at space " + i
return "Car not found"
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Error in Decryption --> Invalid padding. and Data size is no
Use of unassigned local variable taxOwed