Slider
Slider
Slider

We are BoysWillCode.
We Design your Future

Boys Will Code is a community built to encourage boys to code.

Lorem Ipsum

Lorem Ipsum is simply dummy text of the printing and typesetting

Lorem Ipsum

Lorem Ipsum is simply dummy text of the printing and typesetting

Lorem Ipsum

Lorem Ipsum is simply dummy text of the printing and typesetting

Lorem Ipsum

Lorem Ipsum is simply dummy text of the printing and typesetting

Our Clients

We Value The Quality First

The greatest education in the world is watching the masters at work.

- Michael Jackson

Tomorrow is my exam, but I don't care. Bcoz a single sheet of paper can't decide my future.

- Thomas Edison

If you can't make it good, at least make it look good.

- Bill Gates

Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.

- Linus Torvald

An eye for an eye only ends up making the whole world blind.

- Quote Author (Quote #5)

Services

Lorem Ipsum is simply dummy text of the printing and typesetting the readable content of a page when looking at its layout. The point of using Lorem Ipsum is it has a more-or-less normal distribution of letters, as opposed readable English.



Our Experties

Lorem Ipsum is simply dummy text of the printing and typesetting

HTML5
60%
CSS3
88%
jQuery
95%
WordPress
74%

Blog

Tuesday, September 28, 2021

Write A Java Program to Input Marks of Five Subjects of a Student and Calculate the Total, Average, And Percentage of All Subjects.

 

write a program to store the marks of 5 subjects and take the total, after that calculate average, to get average divide the variable to 5.0. and to get the percentage  divide the variable into 500.0 and multiply it to 100


Wednesday, September 22, 2021

3. Data Type Int Variable with Value

 


2. Arithmetic Operator

 


1. My First Code.

         1. Any line starting with // is a comment

        2. #include <iostream> to use cout that allows us to print output on the screen.
       
3 using namespace std; statement so we can use nicknames for our variables
       
4. int main() {...} A valid C++ program must have the main() function. The curly braces indicate the start and the end of the function.
       
5. cout in our program to print output on the screen.
       
6. cout << "Hello World!"; The execution of code beings from this function.
       
7. The return 0; statement is the "Exit status" of the program.
        Note:
; is used to indicate the end of a statement.

        CODE


        #include <
iostream> // to use input and output   
 
       using namespace std; // use nickname to variables

       
int main() // main function

       
{ // open curly braces or tag

       
cout<<"Hello Boyswillcode!"<<endl;

       // cout<< is the code for saying print out
      // endl means endline

       
return 0; // return the value from zero

       
} // closing tag or curley braces













A program that reads an integer that is typed in by the user and computes and prints the square of that integer.

A variable

        int numberOfStudents;
       
String name;
        double
x, y;
        boolean
isFinished;
        char
firstInitial, middleInitial, lastInitial;
 
 
 
 
 
 
 
 
 
 
public class BSIT
{

   
public static void main(String[] args)
    {
       
int numberOfStudents = 123;
       
String name = "bOYSWILLCODE";
        double
x = 7.8 , y = 78.5;
        boolean
isFinished = true;
        char
firstInitial = 'B', middleInitial = 'W', lastInitial = 'C';

       
System.out.print("My Student Id is: " + numberOfStudents + " and ");
       
System.out.print(" My name is: " + name);
       
System.out.print(" My Height is: " + x + " and ");
       
System.out.print(" weight is: " + y);
       
System.out.print("Am I Really Finish? " + isFinished + " Your Initial is: ");
       
System.out.print(firstInitial);
       
System.out.print(middleInitial);
       
System.out.print(lastInitial);

   
}

}

variables with default value


public class BSIT
{

   
public static void main(String[] args)
    {
       
int numberOfStudents = 123; // variable with default value
       
        // to add variable to display use the " + " sign without quotation
       
System.out.print("My Student Id is: " + numberOfStudents);
       
   
}

}
Output
  My Student Id is: 123


















 


Contact Us

Contact Form

Name

Email *

Message *