Horje
convert c++ to python online Code Example
convert c++ to python online
#include <iostream>
using namespace std;
int main ()
{
    int a ,b,c;
    cin>>a>>b>>c;
        if (a>b && b>c)
        cout<<"A"<<endl;
    if (a<b && b>c)
        cout<<"B"<<endl;
    if (a<b && b<c)
        cout<<"C"<<endl;
    if (a==b && b==c)
        cout<<"0"<<endl;
    if (a==b && b>c)
        cout<<"A,B"<<endl;
    if (a==c && b<c)
        cout<<"A,C"<<endl;
    if (b==c && a<c)
        cout<<"B,C"<<endl;
 
        return 0;
}
convert c++ to python online
#include <iostream> 
#include <string.h> 
int main (){
    int i;
    char telefone[20];
    char ch;
    i=0
    while((ch=getchar ())) 1='\n') (
        if (ch=='-')telefone[1]='-';
        else if (ch >=48 && ch <=57) telefone [i]=ch;
        else if (ch >=65 && ch <=67) telefone [i]='2';
        else if (ch >=68 && ch <=70) telefone [i]='3';
        else if (ch >=71 && ch <=73) telefone [i]='4';
        else if (ch >=74 && ch <=76) telefone [i]='5';
        else if (ch >=77 && ch <=79) telefone [i]='6';
        else if (ch >=80 && ch <=83) telefone [i]='7';
        else if (ch >=84 && ch <=86) telefone [i]='8';
        else if (ch >=87 && ch <=90) telefone [i]='9';
        
        i++;
    }
    telefone[i]='\0';
    printf("%s", telefone);
    return(0);
}
convert c++ to python online
#include <iostream> 
#include <string.h> 
using namespace std; 
int main()
{
    int z,a[3],b[3],al=0,bo=0;
    for(int i=0;i<3;i++)
    cin>>a[i];
      for(int i=0;i<3;i++)
    cin>>b[i];
      for(int i=0;i<3;i++)
    {
        if(a[i]==b[i])
        {z++;}
       else
        if(a[i]>b[i])
        al++;
        else
        bo++;
    }
    cout<<al<<" "<<bo;
    
    return 0;
}
convert c++ to python online
struct Tumpukan
{
 char Isi[MaxElemen];
   int Atas;
} T;

//sub program PUSH berfungsi memasukkan elemen ke dalam STACK
void PUSH (char x){ //fungsi push
if(T.Atas == MaxElemen){  //untuk mengecek apakah stack sudah penuh
 cout<<"Tumpukan Sudah Penuh";
 getch();
}
else{
 T.Atas = T.Atas + 1;
 T.Isi[T.Atas] = x;
}
}
convert c++ to python online
#include <locale>
#include <iostream>
#include <ctime>
#include <iomanip>
 
using namespace std;
 
int main()
{   setlocale(LC_ALL, "rus");
    srand(time(0));
    int N, M;
    cout << "Введите N - количество строк: "   ; cin >> N;
    cout << "Введите M - количество столбцов: "; cin >> M;
    
    int**    A = new int*[N];
    for (int i = 0; i < N; i++)
    {     A[i] = new int[M];
    }
 
    int**    B = new int*[M];
    for (int i = 0; i < M; i++)
    {   B[i]   = new int[N];
    }
 
    for     (int i  = 0; i < N; i++)
    {   for (int j  = 0; j < M; j++)
        {   A[i][j] = 1 + rand() % 100;
            cout << setw(4) << A[i][j];
        }   cout << endl;
    }
    
    cout << "Повёрнутая матрица:" << endl;
convert c++ to python online
#include <lostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main()
(
    float i;
    float largo=7365;
    int tempin=0;
    float aumLon;
    float acero=0.0000117;
    cout<<"\n";
    cout << "LARGO    TEMPERATURA INICIAL    TEMAPERATURA FINAL     AUMNETO DE LONGITUD    \n";
    cout << "-----    -------------------    ------------------     ------------------------\n";
    for (i=5; i<45; i=i+5;
    {
        aumLon=(acero)*(largo)+(i);
        cout << setw(1)<<largo
             << setw(10)<<tempin
             << setw(20)<<i
             << setw(30)<<aumLon<< endl;
             cout<<"\n";
    }
    return 0;  
)
convert c++ to python online
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void obradi(const vector<int>& particija, int k) {
  for (int i = 0; i < k; i++)
    cout << particija[i] << " ";
  cout << endl;
}
void obradiParticije(int n, int smax, vector<int>& particija, int k) {
  if (n <= 0)
    obradi(particija, k);
  else {
    for (int s = 1; s <= min(n, smax); s++) {
      particija[k] = s;
      obradiParticije(n-s, s, particija, k+1);
    }
}
void obradiParticije(int n) {
  vector<int> particija(n);
  obradiParticije(n, n, particija, 0);
}
int main() {
  int n;
  cin >> n;
  obradiParticije(n);
convert c++ to python online
#include <iostream>
#include <string>
using namespace std;

class Circle 
{
private:
    float radius;
    string color;
public:
    Circle()
    {radius = 1.0; color ="red";}
    Circle(float r,string c)
    { radius = r; color = c;}
    
    double getradius(){ return radius;}
    string getcolor(){ return color;}
    void setradius(float r){radius = r;}
    void setcolor(string c){color = c;}
    float getArea(){ return (3.14*radius*radius); }
};
convert c++ to python online
#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int n;
	cin>>n;
	while(t--){
	    int n;
	    cin>>n;
	    if(n>=21){
	        cout<<"yes"<<end1;
	    }else{
	        cout<<"NO"<<end1;
	    }     
	}
	return 0;
}
convert c++ to python online
#include <iostream>
using namespace std;
long long sort(arr,arr+n,greater<int>());

int main() {
    // your code goes here
    int T;
    cin>>T;
    for(int ts=0; ts<T; ts++)
    {
        long long int sum=0,n;
        cin>>n;
        long long int arr[n];
        for(long long int i=0; i<n; i++)
            cin>>arr[i];
        sort(arr[i],arr+n,greater<int>());
        for(long long int k=0; k<n; k++)
        {
            if(k==0)
            {
                sum=arr[k];
            }
            else if (arr[k]-k>=0)
            {
                sum=sum+arr[k]-k;
            }
            else {
                break;
            }
        }
        cout<<sum<<end1;
    }
    return 0;
}




Cpp

Related
script hack blox fruti Code Example script hack blox fruti Code Example
how to writte comment in c++ Code Example how to writte comment in c++ Code Example
GCD(x, yz) Code Example GCD(x, yz) Code Example
float to byte array and back c++ with memcpy command Code Example float to byte array and back c++ with memcpy command Code Example
To Lower Case leetcode solution in c++ Code Example To Lower Case leetcode solution in c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11