EvoNext
1.79K subscribers
272 photos
16 videos
266 files
484 links
Download Telegram
EvoNext
#TRY_ON_YOUR IDE C++ code that calculate addition of matrix transpose and multiplication #include <iostream> using namespace std; void multi(int arr[3][4],int arr2[4][3]); void add(int mat[3][4],int m[3][4]); void transpose(int arr[3][4]); int main() {…
continued....

In C++ an array variable is actually a
pointer variable that points to the first indexed variable of the array. Given the
following two variable declarations, p and a are the same kind of variable:
int a[10];
#def int* IntPtr;
IntPtr p;

* The fact that a and p are the same kind of variable. Since a is a pointer that points to a variable of type int (namely the
variable a[0]), the value of a can be assigned to the pointer variable p as
follows:
p = a;

After this assignment, p points to the same memory location that a points to. So, p[0], p[1], … p[9] refer to the indexed variables a[0], a[1], … a[9]. The square bracket notation you have been using for arrays applies to pointer variables as long as the pointer variable points to an array in memory

» You cannot change the pointer value in an array variable, such as a.




1 //Program to demonstrate that an array variable is a kind of pointer variable.
2 #include <iostream>
3 using namespace std;
4
5 #def int* IntPtr;
6
7 int main( )
8 {
9 IntPtr p;
10 int a[10];
11 int index;
12
13 for (index = 0; index < 10; index++)
14 a[index] = index;
15
16 p = a;
17
18 for (index = 0; index < 10; index++)
19 cout << p[index] << " ";
20 cout << endl;
21
22 for (index = 0; index < 10; index++)
23 p[index] = p[index] + 1;
24
25 for (index = 0; index < 10; index++)
26 cout << a[index] << " ";
27 cout << endl;
28
29 return 0;
30 }

#what_is_the_output_of_these_program?

https://t.me/+txk6Ik_UwGc4ZGM0

https://t.me/+txk6Ik_UwGc4ZGM0
3👍1
//a program that works average of n students' maths score

#include <iostream>
using namespace std;

int main(){

int sum,n,i,sub_total;
sum =0;
n = 1;
sub_total = 0;
cout <<"enter number of students: ";
cin >>n;
int array[sub_total];
for(i=1;i>=n;i++)
{ if(array[i]>=0){
cout <<"score of e student "<<i <<": " << endl;
cin >> array[i];
sum+= array[i];



}

}

cout <<"the sum is: " << sum << endl;
float average;
average = sum/n;
cout <<"the average is: " << average;
}
🔥1
//charging of parked car

#include <iostream>
using namespace std;

int main()
{
char type;
int charge, hours;
charge = hours* type;
cout <<"enter your vehicle 'c' 'b' 't': ";
cin >> type;

switch(char){
case 'c':

cout << "enter the parked hours: ";
cin >> hours;
charge = 2 * hours;
cout <<"your charged amount is $:\n" << charge;
break;
case 'b':

cout <<"enter hours parked: ";
cin << hours;
charge = 3 * hours;
cout <<" your charged amount is $:\n" << charge;
break:
case 't':

cout <<"enter the parked hours: ";
cin >> hours;
charge = 5 * hours;
cout <<"your charged amount is $:\n" << charge;
break;


}
}
👍2
#include <iostream>
using namespace std;

int main()
{
char chr;
cout <<" Wel come to 'LEARN TO CODE' telegram channel.\n";
chr = 'j';
cout <<"Enter 'j' to join our channel." << endl;
cin >> chr;


cout <<"https://t.me/PROGRAMINGLANGUAGES1";

return 0;
}





thanks 👉🏿https://t.me/PROGRAMINGLANGUAGES1
2
DS286.AUG2016.Lab2_.cpp_tutorial.pdf
1.8 MB
now 🤫 c++ is no more difficult👏👆🏿👆🏿👆🏿
2👍1
//C++ program for converting degree Celsius into Fahrenheit and vice versa


#include<iostream>
using namespace std;

int main()
{
float fahr, cel;
char option;

cout << "Choose from following option:" << endl;
cout << "1. Celsius to Fahrenheit." << endl;
cout << "2. Fahrenheit to Celsius." << endl;
cin >> option;

//option for converting celsius into fahernheit
if (option == '1')
{
cout << "Enter the temperature in Celsius: ";
cin >> cel;

fahr = (1.8 * cel) + 32.0; //temperature conversion formula
cout << "\nTemperature in degree Fahrenheit: " << fahr << " F" << endl;
}
//option for converting Fahrenheit into Celsius
else if (option == '2')
{
cout << "Enter the temperature in Fahrenheit: ";
cin >> fahr;

cel = (fahr - 32) / 1.8; //temperature conversion formula
cout << "\nTemperature in degree Celsius: " << cel << " C" << endl;
}
else
cout << "Error Wrong Input." << endl;

return 0;


https://t.me/PROGRAMINGLANGUAGES1
👍1🔥1
ppt from chapter #3_#5 for c++👌💻💻 https://t.me/PROGRAMINGLANGUAGES1
🎉1
@uestion from pointer👇🏿

#include <iostream>
using namespace std;

int main() {

int value1 = 6, value2=14;
int *p1 , *p2;

p1=&value1;
p2 =&value2;
*p1 = 10;
*p2 = *p1;
p1 = p2;
*p1=20;

cout «" the value of value1 is: " « value1 « endl;
cout «" the value of value2 is: " « value2 « endl;

}

what is the output of this c++ code Is: https://t.me/PROGRAMINGLANGUAGES1/152
👍21
the output of value1 and value2 is —- and —— respectively.
Anonymous Poll
5%
10 & 14
28%
6 & 14
51%
10 & 20
5%
6 & 20
12%
NONE
👍7👎1
AAU_COMPUTER_PROGRAMMING_FINAL_EXAM.pdf
318.1 KB
c++ last year's final 💻-AAU🖇 computer programming
1
Media is too big
VIEW IN TELEGRAM
[ Video ]
let's invite you nice youtube channel for learning code in Amharic(if you do not know). <ethio programing>

‼️NOT ❗️ SPONSERED PROMOTION😅😅
Which one of the following unconditional selection statements is used outside a loop?,...
Anonymous Quiz
21%
Exit
34%
Goto
18%
Break
14%
Continue
13%
NONE
👍2