A
Anonymous

Computation Table - Copy this React, Tailwind Component to your project

#include <iostream> #include <cmath> #include <iomanip> #include <vector> int main() { const double ms = 1e 6; std::vector<int> n_values for (int i = 10; i <= 200; i += 10) { n_values.push_back(i); } std::cout << std::setw(10) << << std::setw(15) << << std::setw(20) << << std::endl; for (int n : n_values) { double f1 = std::pow(3, n) * ms; double f2 = std::log(n) * ms; if (f1 > 1e6) { std::cout << std::setw(10) << n << std::setw(15) << "Занадто велике число." << std::setw(20) << f2 << std::endl; } else { std::cout << std::setw(10) << n << std::setw(15) << f1 << std::setw(20) << f2 << std::endl; } } return 0; } переделай код

Prompt
Component Preview

About

ComputationTable - A dynamic table displaying computations with formatted outputs, built with React and Tailwind. Access free code!

Share

Last updated 1 month ago