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
import java.util.*; | |
class Client{ | |
int id,hours; | |
String address,name; | |
double cons; | |
Client(String name,int id,String addr,int hours){ | |
this.id = id; | |
this.name = name; | |
this.address = addr; |
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
mx = {'name':'Name','count':0} | |
def process_input(s): | |
row = s.split(); | |
if len(row)==4: | |
nm = row[1] | |
cnt = int(row[3]) | |
if cnt>mx['count']: | |
mx['name'] = nm | |
mx['count'] = cnt |
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
import java.awt.*; | |
import java.awt.event.*; | |
import java.applet.Applet; | |
public class TicTacToe extends Applet implements MouseListener | |
{ | |
Frame f; | |
int flag=2,n,m,i=0; | |
char ch[]=new char[9]; |
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; | |
struct Dog{ | |
string name; | |
}; | |
struct Cat{ | |
string name; |
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> | |
#include <cfloat> | |
using namespace std; | |
int main() | |
{ |
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
import java.util.*; | |
import java.lang.*; | |
class test{ | |
public static void main(String[] args){ | |
Scanner s = new Scanner(System.in); | |
int investment; | |
double interest,fv5,fv10,fv15,fv20; | |
System.out.print("Enter investment: "); | |
investment = s.nextInt(); |
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 TestProgram{ | |
public static void main(String[] srgs){ | |
String s = "abc123"; | |
System.out.println(sumDigits(s)); | |
} | |
public static int sumDigits(String s){ | |
int l,sum=0; | |
l = s.length(); | |
for(int i=0;i<l;i++){ | |
if(s.charAt(i)>='0' && s.charAt(i)<='9'){ |
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
namespace console | |
{ | |
class Program { | |
static void Main() //TBD | |
{ | |
double count; | |
double Double = 10; // declare variables | |
for(int i = 0;i < Double;i++) //keep doing | |
{ |
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> | |
#include<vector> | |
using namespace std; | |
int main(){ | |
cout<<"witness my exciting first use of vectors!\n"; | |
cout<<"Enter as many letter as you like, enter ! to quit.\n"; | |
char ch; | |
vector<char> v; |
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; | |
/* Part (i) */ | |
struct Rectangle{ | |
int width; | |
int height; | |
}; |