Skip to content

Instantly share code, notes, and snippets.

movies = {'red' => 3}
puts "Hey write add"
choice = gets.chomp
case choice
when "add"
puts "What movie?"
title = gets.chomp
puts "What is the rating"
rating = gets.chomp
cal,a,b,d = 0,100,100,[]
while a < 1000 do
while b < 1000 do
c = a * b
if c.to_s == c.to_s.reverse
d.push(c)
end
b = b + 1
end
a,b,c = 3,4,5
while a < 1001 do
while b < 1001 do
while c*c < (a*a + b*b +1) do
if a + b + c == 1000
if a*a + b*b == c*c
x = a * b * c
puts x
end
a= 2mn; b= m^2 -n^2; c= m^2 + n^2;
a + b + c = 1000;
2mn + (m^2 -n^2) + (m^2 + n^2) = 1000;
2mn + 2m^2 = 1000;
2m(m+n) = 1000;
m(m+n) = 500;
m>n;
puts "You see Grandma, what do you say?"
stop1,stop2 = false,false
while stop1 == false do
input = gets.chomp
if input != input.upcase
puts 'HUH? SPEAK UP SONNY!'
else
puts 'NO, NOT SINCE 1938!'
convo = []
while stop2 == false do
namespace ConsoleApplication12
{
class Program
{
static void Main(string[] args)
{
long num = 600851475143;
double limit = Math.Sqrt(num);
int limit2 = (int) limit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication13
{
class Program
{
cal,a,b,d = 0,100,100,[]
while a < 1000 do
while b < 1000 do
c = a * b
if c.to_s == c.to_s.reverse
d.push(c)
end
b = b + 1
end
a,b = a + 1, 100
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication13
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace ConsoleApplication14
{
class Program