Facebook
From Scorching Motmot, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 278
  1. #include "stdafx.h"
  2. #include <iostream>
  3. using namespace std;
  4. int ZnajdzWierszZZerami(int n,double tint[10][10])
  5. {
  6.         int result = -1;
  7.         int i, j;
  8.         for (i = 0; i < n; i++)
  9.         {
  10.                 for(j=0;j<n;j++)
  11.                 {
  12.                         if (tint[i][j] != 0)
  13.                         {
  14.                                 break;
  15.                         }
  16.                 }
  17.                 if (j == n)
  18.                 {
  19.                         result = i;
  20.                         return result;
  21.                 }
  22.                 return result;
  23.         }
  24.  
  25. }
  26. //funkcja zerujaca
  27. void f3(double tint[10][10][10],int n)
  28. {
  29.         for (int i = 0; i < n; i++)
  30.         {
  31.                 for (int j = 0; j < n; j++)
  32.                 {
  33.                         for (int k = 0; k < n; k++)
  34.                         {
  35.                                 tint[10][10][10] = { 0 };
  36.                         }
  37.                 }
  38.         }
  39.         cout << tint[10][10][10] << endl;
  40. }
  41. void f2(int n, double x[], double a[],double b[])
  42. {
  43.         for (int i = 0; i < n; i++)
  44.         {
  45.                 double suma = 0;
  46.                 for (int j = i; j <= n;j++)
  47.                 {
  48.                         suma = suma + a[i] * x[j];
  49.                 }
  50.                 b[i] = suma / (2 * n);
  51.         }
  52.  
  53. }
  54. //funckja liczaca wyrazenie
  55. double raora( double x, double a, double b, double c, double d)
  56. {
  57.         return a*pow(x, 1 / 11.0) + b*(x, 1 / 3.0) + c*(x, 1 / 7.0) + d;
  58.        
  59. }
  60. int main()
  61. {
  62.         const char znakConst = 45;
  63.         const double realConst = 4.5;
  64.         double t[10][10] = {
  65.                 {4,6,8},
  66.                 {3,5,2},
  67.                 {1,5,1},
  68.         };
  69.         //wyzerowac tablice 3 wymiarowa
  70.         double tint[10][10][10] = { 1,2,3 };
  71.         float tfloat[10] = { 3,5.5,5.3,8,0.5 };
  72.        
  73.        
  74.  
  75.  
  76.         return 0;
  77. }
  78.