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
public class Lesson2 { | |
private static int i; | |
public static void main(String[] args) { | |
Thread t1 = new Thread(new Thread2()); | |
Thread t2 = new Thread(new Thread2()); | |
t1.start(); | |
t2.start(); | |
try { | |
t1.join(); |
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
public static void main(String[] args) throws ExecutionException, InterruptedException { | |
ExecutorService es1 = Executors.newFixedThreadPool(5); | |
Future<String> f1 = es1.submit(new Callable<String>() { | |
public String call() { | |
return "Hello"; | |
} | |
}); | |
while(!f1.isDone()) { } | |
try { | |
System.out.println("Получили " + f1.get()); |
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
#include "pch.h" | |
#include <iostream> | |
#include <windows.h> | |
#include <math.h> | |
int myFact(int n); | |
int recFact(int n); | |
int main() | |
{ |
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
#include "pch.h" | |
#include <stdio.h> | |
#include <windows.h> | |
#include <math.h> | |
#include <iostream> | |
double myFact(int n); | |
int main() | |
{ |
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
#include "pch.h" | |
#include <stdio.h> | |
#include <windows.h> | |
#include <math.h> | |
double myFact(int n); | |
int main() | |
{ | |
SetConsoleOutputCP(1251); |
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
#include "pch.h" | |
#include <stdio.h> | |
#include <windows.h> | |
#include <math.h> | |
double myFact(int n); | |
int main() | |
{ | |
double x, sum = 0, ctg, min, fac; |
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
#include "pch.h" | |
#include <iostream> | |
#include <stdio.h> | |
#include <windows.h> | |
#include <math.h> | |
double myFact(int n); | |
int main() | |
{ |
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
#include "pch.h" | |
#include <iostream> | |
#include <stdio.h> | |
#include <windows.h> | |
#include <math.h> | |
double myFact(int n); | |
int main() | |
{ |
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
#include "pch.h" | |
#include <iostream> | |
#include <stdio.h> | |
#include <windows.h> | |
#include <math.h> | |
double myFact(int n); | |
int main() | |
{ |
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
#include "pch.h" | |
#include <windows.h> | |
#include <conio.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <iostream> | |
int getArrSize(int* arr); | |
int main() { |
OlderNewer