online compiler c++ with big O calculator
for (int i = 1 ; i <= N-1 ; i++)
{
if ( i < 1 ) //assume always False
{
A = i + 10;
B = A + N;
}
else if ( i > N) //assume always False
{
A = i +5;
B = A + 10;
}
else
{
A = i + 20;
B = A + 5;
}
}
online compiler c++ with big O calculator
int func(int n,int m){
if (n==2)
return n-m;
else
return m*func(n-2,m-1)+1;
}
online compiler c++ with big O calculator
for(int i = 0; i < N-1; i++)
{
if (data[i] >= 0) //Assume always true
{
Count(i,N);
Display();
}
else
{
Console.Write(“Wrong input”);
data[i] = 0;
}
}
public void Count(int first, int second)
{
hasil = first * second;
data[first] = hasil;
}
public void Display()
{
for(int y=0; y < N; y++)
{
Console.Write(data[i]);
Console.Write(hasil);
}
}
online compiler c++ with big O calculator
for (int i = 1; i < n; i++) {
for (int j = 0; j < i * i; j++) {
}
}
online compiler c++ with big O calculator
int i=0;
int sum=0;
while (i < 100) {
if (i % 2 == 0) {
for (int k = 0; k < n; k++) {
sum += vec[i];
}
}
else {
for (int k=0; k
online compiler c++ with big O calculator
for(i=1;i<10;i*=6)
for(j=10;j>=1;j--){
s=s+j;
t=t+i;}
online compiler c++ with big O calculator
#include
using namespace std;
int main ()
{
int arr[100], n, i, max, min;
cout << "Enter the number of the students given quiz : ";
cin >> n;
cout << "Enter the marks scored by them : ";
for (i = 0; i < n; i++)
cin >> arr[i];
max = arr[0];
for (i = 0; i < n; i++) //finding maximum score.
{
if (max < arr[i])
max = arr[i];
}
min = arr[0];
for (i = 0; i < n; i++) //finding minimum score.
{
if (min > arr[i])
min = arr[i];
}
cout << "top score : " << max<<"\n";
cout << "least score : " << min;
return 0;
}
online compiler c++ with big O calculator
Algorithm1(int n)
for (i=0; i
online compiler c++ with big O calculator
#include
using namespace std;
int recursive_sum(int m, int n) {
if (m == n)
return m;
return m + recursive_sum(m + 1, n);
}
int main()
{
int m=1, n=5;
cout<<"Sum = "<
online compiler c++ with big O calculator
for (int i = 1; i < n; i++) {
for (int j = 0; j < i * i; j++) {
}
}
|