AFRICA CODER
前往频道在 Telegram
We are helping you to learn programming We provide Short Notes, video, and also pdf of Programming Languages Join Our Group And Subscribe For more info. We grow up together!! for any suggestion contact me👉 @bluefannn
显示更多未指定国家技术与应用67 893
770
订阅者
无数据24 小时
无数据7 天
无数据30 天
帖子存档
770
Repost from Java Development
#Quiz_Java (Question - 15)
which is the range of byte data type in Java?
770
Repost from Java Development
#Quiz_Java (Question - 13)
What’s the base class in Java from which all classes are derived?
770
Repost from Java Development
#Quiz_Java (Question - 12)
when was the year oak was renamed as java?
770
Repost from Java Development
#Quiz_Java (Question - 6)
What if I write static public void instead of public static void?
770
Repost from Java Development
#Quiz_Java (Question - 5)
Is Java platform Independent ???
770
Repost from Java Development
#Quiz_Java (Question - 4)
What Are Access Modifiers In Java ???
770
Repost from Java Development
#Quiz_Java (Question - 1)
Which company owns Java at present _____
770
nice material to explore your coding skill.🤙, CODING is like building library that has many shelves to store book « "/*books represents data in coding*/; so you can sore books orderly to use it in case needed. By the way, coding needs not your past experience with programming rather you #problem_solving_skill✍️🤜 SHARE AND INVITES AND JOIN us https://t.me/Africacoder😊
ቤተሰብ መልካም አመሻሽ 🙏
770
--------------🧑💻🧑💻🧑💻🧑💻-----------
✍️✍️✍️✍️✍️
AS GENERAL KNOWLEDGE--
DATATYPES SIZES PRIM/REFE.
1.boolean ' 1 bit ' primitive
2.byte ' 1 byte ' primitive
3.short ' 2 byte ' primitive
4. int ' 4 byte ' primitive
5.long ' 8 byte ' primitive
6.float ' 4 byte ' primitive
7.double ' 8 bytes ' primitive
8.char ' 2 bytes ' primitive
9.string ' varies ' reference
#what are primitives? and references?
Comment your answer
Follow @Africacoder 😊
770
✍🏻✍🏻......🌿🌿🌿......✍🏻✍🏻
Student subject grading source
code in c++
✍🏻✍🏻......🌿🌿🌿......✍🏻✍🏻
#include <iostream>
using namespace std;
int main(){
int marks;
cout<<"Enter Your Marks: ";
cin>>marks;
if (marks >= 90)
{
cout<<"Your Grade is A+";
}
else if (marks >= 80)
{
cout<<"Your Grade is A";
}
else if (marks >= 70)
{
cout<<"Your Grade is B+";
}
else if (marks >= 60)
{
cout<<"Your Grade is B";
}
else if (marks >= 50)
{
cout<<"Your Grade is C";
}
else if (marks >= 40)
{
cout<<"Your Grade is D";
}
else if (marks >= 30)
{
cout<<"Your Grade is E";
}
else if (marks <= 30)
{
cout<<"Your Grade is F";
}
else
{
cout<<"Enter Valid Marks";
}
return 0;
}770
C++ LESSON 4 :
✍🏻✍🏻......🌿🌿🌿......✍🏻✍🏻
Algorithms and flowcharts
➾are different mechanisms used for designing different programs, particularly in computer programming.
➾An algorithm is a step-by-step summary of the procedure
➾flowchart illustrates the steps of a program graphically.
770
C++ LESSON 3 :
✍🏻✍🏻......🌿🌿🌿......✍🏻✍🏻
Variables
➾are containers for storing data values.
➾ there are different types of variables (defined with different keywords),
for example:
⓵. int - stores integers (whole numbers), without decimals, such as 123 or -123
⓶. double - stores floating point numbers, with decimals, such as 19.99 or -19.99
⓷. char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes
⓸. string - stores text, such as "Hello World". String values are surrounded by double quotes
⓹. bool - stores values with two states: true or false
Declaration of variables
➾syntax : data type variable name;
Example: int a;
Initialization of variable
➾set value for declared variable
➾syntax : data type variable = variable value;
➾Example : int a =4;
Identifiers
➾are the unique names given to variables, classes, functions, or other entities by the programmer.
➾For example, int money;
➾Only alphabetic characters, digits, and underscores are allowed.
➾The identifier name cannot start with a digit, i.e., the first letter should be alphabetical. After the first letter, we can use letters, digits, or underscores.
In C++, uppercase and lowercase letters are distinct. Therefore, we can say that C++ identifiers are case-sensitive.
➾A declared keyword cannot be used as a variable name.
For more information on identifiers https://www.javatpoint.com/cpp-identifiers
➾there are valid and invalid indentifiers
Share our channel 👇👇
https://t.me/Africacoder
770
this pdf gives you short cut to cover necessary terminologies about java.
👌💻💻✍️🔖
size: 432kb;
prepared by: Ltc
why this: helps to be familiar with the terminologies of java
@africacoder 😊
770
😎😎😎😎-------------------JAVA----------😎😎😎
LESSON 6: ARRAY AND 2D ARRAYS
✅An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.
✳️Multidimensional Arrays can be defined in simple words as array of arrays. Data in multidimensional arrays are stored in tabular form (in row major order).
*In the array there will be:
data_type : type of data to be stored in the array
dimension: the dimension of the array is created. like 1D, 2D ...
array_name: name of the array
finally , the size of the array.
#example_of_array:;
class CODER
{
public static void main (String[] args)
{
// declares an Array of integers.
int[] arr;
// allocating memory for 5 integers.
arr = new int[5];
// initialize the first elements of the array
arr[0] = 10;
// initialize the second elements of the array
arr[1] = 20;
//so on...
arr[2] = 30;
arr[3] = 40;
arr[4] = 50;
// accessing the elements of the specified array
for (int i = 0; i < arr.length; i++)
System.out.println("Element at index " + i +
" : "+ arr[i]);
}
}
2D array:-
class Learn {
public static void main(String[] args)
{
int[][] arr = new int[10][20];
arr[0][0] = 1;
System.out.println("arr[0][0] = " + arr[0][0]);
}
}
https://t.me/Africacoder 😊
ይቀጥላል ቤተሰብ መልካም ቀን ተመኘን 🙏770
LESSON 5:
JAVA MATH:
⚜️The Java Math class has many methods that allows you to perform mathematical tasks on numbers.
✳️The Math.sqrt(x) method returns the square root of x.
✳️The Math.max(x,y) method can be used to find the highest value of x and y.
✳️ The Math.abs(x) method returns the absolute (positive) value of x.
❤️ Math.random() returns a random number between 0.0 (inclusive), and 1.0 (exclusive).
public class Firsta {
public static void main(String[] args) {
double x,y,z;
/*double x = 3.14;
double y = 3.41;
double z = Math.max(x, y);
double a = Math.sqrt(5);
double ab = Math.ceil(x);// maximum number
double ac = Math.floor(y);// minimum number
System.out.println(z);*/
System.out.println(a);
System.out.println(ab);
‼️THERE ARE ALOT OF METHODS IN JAVA FOR FURTHER MATHEMATICAL OPERATIONS770
✍🏻✍🏻......🌿🌿🌿......✍🏻✍🏻
source code of calculator
in c++
✍🏻✍🏻......🌿🌿🌿......✍🏻✍🏻
# include <iostream>
using namespace std;
int main() {
char op;
float num1, num2;
cout << "Enter first operands: ";
cin >> num1;
cout << "Enter operator: +, -, *, / : ";
cin >> op;
cout << "Enter second operands: ";
cin >> num2;
switch(op) {
case '+':
cout << num1 << " + " << num2 << " = " << num1 + num2;
break;
case '-':
cout << num1 << " - " << num2 << " = " << num1 - num2;
break;
case '*':
cout << num1 << " * " << num2 << " = " << num1 * num2;
break;
case '/':
cout << num1 << " / " << num2 << " = " << num1 / num2;
break;
default:
// If the operator is other than +, -, * or /, error message is shown
cout << "Error!"<<op<<" is not operator";
break;
}
return 0;
}
Share our channel 👇👇
https://t.me/Africacoder770
👆👆Relational operators👆👆
🙋🙋exercise 🙋🙋
Say true(T) or false (F)
1. 5! = 6
2. 2.5 <= 7
3.−5 >= 0.1
❗❗Write your answer in comment below❗❗
