Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <math.h>
using namespace std;
float x1;
char w;
int main()
{
float y1, x2, y2, x3, y3, x4, y4, S, S1, S2, S3, p, p1, p2, p3, a, b, c, a1, b1, c1, Z;
while (x1 != 'q') {
cout << "Exit?(y/n) ";
#include <iostream>
#include <math.h>
using namespace std;
float a, b, E, Dx, Ep, x;
int i;
float f(float x) {
return tan(x) - ((tan(x)*tan(x)*tan(x) + 1) / 3) + 0.2*tan(x)*tan(x)*tan(x)*tan(x)*tan(x);
}
float fp(float x) {
return (f(x + Dx) - f(x)) / Dx;
#include <iostream>
#include <math.h>
using namespace std;
double mat[10][10];
double vec[10];
double e[10];
int n;
double x, a, b;
int main() {
float a;
float b;
void setup() {
size (600,600);
}
void draw () {
a=random(300);
b=random(300);
background(120);
pushMatrix();
PFont font;
float a;
float b;
void setup () {
font = createFont("Consolas", 14);
textFont(font);
size(600,600);
}
void draw () {
textSize(45);
1
2
3
4
5
6
7
8
9
0
#include <Windows.h>
#define width 640
#define height 480
LRESULT CALLBACK WindowProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX windowClass;
HWND hWnd;
#include<iostream>
using namespace std;
int main() {
double a[3][3];
double b[3];
for (int i=1; i<4; i++) {
for (int j=1; j<4; j++) {
cout << "Enter left side coeficients" << endl;
cout << "a[" << i << "," << j << "]=";
cin >> a[i][j];
float x;
float a=150;
float b=150;
float da=1;
float db=2;
void setup() {
size(600,600,P3D);
}
void draw() {
x+=0.1;
float x;
void setup() {
size(600,600,P3D);
}
void draw() {
x+=0.1;
background(#A75E0F);
stroke(0);
translate(300,300);
rotateX(PI/3);