i want to write a a program that will accept student name and grades and output it.use an array data structure in the implementation this program and implement the following

write method that will traverses the array and allow the user to perform the following processes

a) search for a particular student and his or her marks
b)find the average of all the student in the class
c)find all student with a mark below 50 and output them.

i started off with this codes in Java .But the thing is if i can do it in java i can do it in C and C++

import java.util.Scanner;
//import java.lang.String;
public class Main {
public static int n;
//public static String names;
//private static String[] nameS;
//private static String[] nameS;
* @param args the command line arguments

public static void main(String[] args/*,String[] nameS*/) {
Scanner in=new Scanner(System.in);
int Da=0;
int num []=new int[n];
//int x=0;

System.out.printf("%s\n","Enter the Number of student taking This Couse");
String name[]=new String [n];
System.out.printf("%s %s \n", "index","value");
for (; Da < name.length; Da++ )/*Da 4 Display array*/ {
System.out.printf( "%5d%8d\n", Da, name[Da] );
System.out.println("Enter the names of the student");
String names;
name[n] = new String(names);
for (; Da < name.length; Da++ ){
System.out.printf( "%5d%8d\n", Da, name[Da] );


i can not input the names into the array( name) i created
pls help me

But the thing is if i can do it in java i can do it in C and C++

Have a go at it and we'll help you. Some folks speak Java, but it's been a while for others. Rather than take up the time of someone in the Java forum to help you write the code and then someone in the C++ forum to help translate it, try it in C++.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.