Skip to content

Instantly share code, notes, and snippets.

View mattmccarthy11's full-sized avatar

Matthew McCarthy mattmccarthy11

View GitHub Profile
#include <iostream>
#include <string>
#include <cstdlib>
using std::cout;
using std::cin;
using std::endl;
using std::string;
///////////////////////////////////////////////////////////////////////////
Verifying my Blockstack ID is secured with the address 17xqEYgNpNj5f5vQeKtPoe4sQFECtAwM3p https://explorer.blockstack.org/address/17xqEYgNpNj5f5vQeKtPoe4sQFECtAwM3p
cout.setf(ios::fixed); // see pp. 32-33 in Savitch 6/e
cout.precision(1);
String[] mystr = {"Jack","Fortran","Amon","Cpp","Phaser"};
for(int i=0;i<mystr.length-1;i++){
for(int j=i+1 ;j<mystr.length;j++){
if( mystr[i].compareTo(mystr[j]) > 0 ){
String tmp = mystr[i];
mystr[i]= mystr[j];
mystr[j]=tmp;
}
import cs1.Keyboard;
public class LexiHell {
public static void main(String [] args){
System.out.println("Enter the First String");
String first = Keyboard.readString();
System.out.println("Enter the Second String");
String second = Keyboard.readString();