New course! Every coder should learn Generative AI!
Try a free lesson0
convert code c++ to java
#include <iostream> using namespace std; #define MAX_LENGTH 100 int main() { //program that asks you to enter your faculty name and departement then enter it using keyboard char name [MAX_LENGTH]={0}; string dep; cout<<" please enter your faculty name:"; cin.getline(name,MAX_LENGTH); cout<<" please enter your departement:"; cin>>dep; cout<<"my faculty is :"<<name<<endl; cout<<"my departement is :"<<dep<<endl; return 0; }
1 Answer
+ 4
We are humans not transpilers ๐คช๐.
Try to do this yourself. It's just basic IO. First start learning Java. If you face difficulty while solving this problem then ask here. Also link the Java code in description of this question.
https://code.sololearn.com/W26q4WtwSP8W/?ref=app