Bom dia,
Preciso converter essas é linguagem em java para c, poderiam me ajudar por favor?
import java.util.Scanner;
public class Questao6 {
private static Scanner reader = new Scanner(System.in);
public static void main(String[] args) {
int n1;
int n2;
int n3;
System.out.println("Digite n1");
n1 = reader.nextInt();
System.out.println("Digite n2");
n2 = reader.nextInt();
System.out.println("Digite n3");
n3 = reader.nextInt();
System.out.println("O maior numero e...");
if (n1 >= n2 && n1 >= n3) {
System.out.println(n1);
} else if (n2 >= n1 && n2 >= n3) {
System.out.println(n2);
} else if (n3 >= n1 && n3 >= n2) {
System.out.println(n3);
}
}
}
##########################
#######################
import java.util.Scanner;
public class Questao11 {
private static Scanner reader = new Scanner(System.in);
public static void main(String[] args) {
// TODO Auto-generated method stub
double n;
double acc = 0;
for (int i=1; i<=20; i = i + 1) {
System.out.println("Digite um numero");
n = reader.nextDouble();
acc = acc + n;
}
System.out.println("A soma dos numeros e " + acc);
}
}