- 4
Convert this C++ code syntax to Python code syntax
#include<bits/stdc++.h> using namespace std ; int main(){ int x; cout<<"enter number of camels\n" ; cin>>x; int a,b,c,d ; cout<<"enter fractions that each son gets(example 1/10 ,1/12 etc)\n" ; cin>>a>>b>>c>>d ; int A=ceil(x*a) ; int B=ceil(x*b) ; int C=ceil(x*c) ; int D=ceil(x*d) ; cout<<A<<" "<<B<<" "<<C<<" "<<D<<"\n" ; }
2 Respuestas
+ 4
We don't work for others. Use might try posting such things in your feed !
+ 2
the code uses some unnecessary variables, (like the captial alphabets variables). and you mostly don't have to use <bits/stdc++.h> unless you defined a lot of preprocessors. here, it only requires two preprocessors, iostream and cmath. maybe you need to find such converter or you need to learn python yourself to convert it