This file contains 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.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
import javax.swing.text.StyledEditorKit.ForegroundAction; | |
public class Problem1 { |
This file contains 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 System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
class Program | |
{ | |
static void Main() | |
{ | |
//The program reads the content of a text file and write its words into one column in a new file. |
This file contains 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
//function calcSircleArea(r) - func with parameter r (radius) | |
function calcCircleArea(r){ | |
//area | |
var area=Math.PI*r*r; | |
return area; | |
//console.log(arguments); --prints arguments of the function | |
} |
This file contains 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
//Функция, която да превръща kw в hp (конски сили) | |
//Вариант 1 | |
function convert_v1(kw_v1){ | |
var hp_v1=Math.round((kw_v1/0.746)*100)/100; | |
return hp_v1; | |
} | |
console.log("Вариант3"); | |
console.log(convert_v1(75)); | |
console.log(convert_v1(150)); |
This file contains 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
<?php | |
// Overview: Find the regular expr. (preg_replace_callback) => func. "articles" => $match1=topic; $match2=author; $realMonth=month; $print=article summary | |
$text=$_GET['text']; | |
function articles($matches){ | |
// $print contains article summary | |
if (strlen($matches[4])>100){ | |
$str=substr((trim($matches[4])),0,100); | |
$print=htmlspecialchars($str)."..."; | |
}else{ |
This file contains 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.Scanner; | |
public class Exam_Task1 { | |
public static void main(String[] args) { | |
//keeps num of eggs | |
int eggs=0; | |
//keeps num of dozens; |
This file contains 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.Scanner; | |
public class Exam_Problem1_DozenEggs { | |
public static void main(String[] args) { | |
//keeps num of eggs | |
int eggs=0; | |
//keeps num of dozens; |
This file contains 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.Scanner; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Exam_Problem2_AddingAngles { | |
public static void main(String[] args) { | |
This file contains 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.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Scanner; | |
import java.util.Set; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
This file contains 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.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Scanner; | |
import java.util.Set; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
OlderNewer