Use C language Create a program that allows the user to inpu
Use C++ language.
Create a program that allows the user to input educational goals from HS diploma, AA Degree, BA or BS degree, MA, or Doctorate. Allow the user start anywhere on their educational path from K through completion of their educational goal, and be told the amount of years remaining in school. C++ language please. And also explanation of the functioning of the source code in detail thank you.
Solution
 /*
 As per this code firstly you have to Enter that in which standard You are studying,
 which will deduct for 10, and will be added with your remaining study year.
 Than you have to select your study limit with (HS diploma, AA Degree, BA or BS degree, MA, or Doctorate)
 after your entering number of years of paarticular study.
 When you will chosse study category it will automatically show you how many years remaining for you to study.
 */
 import java.util.*;
 import java.io.BufferedReader;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
public class KThrough
 {
 public static void main(String args[]) throws NumberFormatException, IOException
 {
 InputStreamReader r =new InputStreamReader(System.in);
 BufferedReader in = new BufferedReader(r);
 int standard;
 System.out.println(\"In which standard are you studing:\");
 standard= Integer.parseInt(in.readLine());
 int total;
 total = (10-standard);
 
 System.out.println(\"Educational goals from HS diploma, AA Degree, BA or BS degree, MA, or Doctorate,\"
 + \" Allow the user start anywhere on their educational path from K through completion of their educational goal, \"
 + \"and be told the amount of years remaining in school\");
 int HS_Diploma;
 System.out.println(\" Enter years for HS diploma:\");
 HS_Diploma = Integer.parseInt(in.readLine());
 
 int AA_Degree;
 System.out.println(\"if you want to study more, Enter years for AA Degree:\");
 AA_Degree= Integer.parseInt(in.readLine());
 
 int BA_or_BS_degree;
 System.out.println(\"if you want to study more, Enter years for BA or BS degree:\");
 BA_or_BS_degree= Integer.parseInt(in.readLine());
 
 int MA;
 System.out.println(\"if you want to study more, Enter years for MA:\");
 MA = Integer.parseInt(in.readLine());
 
 int Doctorate;
 System.out.println(\"if you want to study more, Enter years for Doctorate:\");
 Doctorate = Integer.parseInt(in.readLine());
 
 System.out.println(\"ENTER YOUR CHOICE \"
 + \"\'1\' for Upto HS diploma. \"
 + \"\'2\' for AA Degree. \"
 + \"\'3\' for BA or BS degree. \"
 + \"\'4\' for MA. \"
 + \"\'5\' for Doctorate\");
 int value;
 value= Integer.parseInt(in.readLine());
switch(value)
   
 {
 case 1 :
 int year_HS_Diploma= HS_Diploma;
 System.out.println(\"Years reamining: \"+(total+year_HS_Diploma));
 break;
 case 2 :
 int year_AA_Degree= HS_Diploma+AA_Degree;
 System.out.println(\"Years reamining: \"+(total+year_AA_Degree));
 break;
 case 3 :
 int year_BA_or_BS_degree = HS_Diploma+AA_Degree+BA_or_BS_degree;
 System.out.println(\"Years reamining: \"+(total+year_BA_or_BS_degree));
 break;
 case 4 :
 int year_MA = HS_Diploma+AA_Degree+BA_or_BS_degree+MA;
 System.out.println(\"Years reamining: \"+(total+year_MA));
 break;
 case 5 :
 int year_Doctorate = HS_Diploma+AA_Degree+BA_or_BS_degree+MA+Doctorate;
 System.out.println(\"Years reamining: \"+(total+year_Doctorate));
 break;
 default :
 System.out.println(\"Invalid grade\");
 }
 }
 }
/*
 output:
In which standard are you studing:
 9
 Educational goals from HS diploma, AA Degree, BA or BS degree, MA, or Doctorate, Allow the user start anywhere on their educational path from K through completion of their educational goal, and be told the amount of years remaining in school
 Enter years for HS diploma:
 3
 if you want to study more, Enter years for AA Degree:
 2
 if you want to study more, Enter years for BA or BS degree:
 4
 if you want to study more, Enter years for MA:
 2
 if you want to study more, Enter years for Doctorate:
 1
 ENTER YOUR CHOICE \'1\' for Upto HS diploma. \'2\' for AA Degree. \'3\' for BA or BS degree. \'4\' for MA. \'5\' for Doctorate
 5
 Years reamining: 13
 */


