class Program
{
static void Main()
{
//while (true)
//{
Console.SetCursorPosition(0, 0);
Console.Write("initialVelocity_x:");
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String strA = new String("Roasted "); | |
strA = new String("Toasted "); | |
strA = new String("Fried "); | |
strA = new String("Baked "); | |
strA = new String("Beans "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main (string[] args ) | |
{ | |
int unitCost = 8; | |
int items = 5; | |
Console.WriteLine("total cost: " + (unitCost * items) ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
int totalCost = 6; | |
int items = 12; | |
Console.WriteLine("cost per item: " + totalCost / items); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
int i = 3; | |
int l = i / 2; | |
int k = i % 2; | |
Console.WriteLine(l+" "+k); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int a = 10; | |
int b = 20; | |
bool c; | |
c = !(a > b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int i = 3; | |
int l = i / 2; | |
int k = i % 2; | |
cout << l << k; | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main() | |
{ | |
double initialVelocity_x = 20; | |
double initialVelocity_y = 14; | |
physics.Ball ball= | |
new physics.Ball(initialVelocity_x, initialVelocity_y); | |
double time=ball.CalculateReturnTime(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package testschool; | |
import school.*; | |
public class Tester { | |
public static void main(String[] args){ | |
Faculty scienceFac=University.createFaculty("Science"); | |
Department compSciDept= scienceFac.openNewDepartment("Computer Science"); | |
Department physicsDept= scienceFac.openNewDepartment("Physics"); | |
System.out.print(scienceFac==physicsDept.getFaculty()); //expected to return scienceFac object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using school; | |
namespace testschool{ | |
public class Tester { | |
static void Main(){ | |
Faculty scienceFac=University.createFaculty("Science"); |