//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
#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
#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
Telegram
LEARN TO CODE
the output of value1 and value2 is —- and —— respectively.
10 & 14 / 6 & 14 / 10 & 20 / 6 & 20 / NONE
10 & 14 / 6 & 14 / 10 & 20 / 6 & 20 / NONE
👍2❤1
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😅😅
let's invite you nice youtube channel for learning code in Amharic(if you do not know). <ethio programing>
‼️NOT ❗️ SPONSERED PROMOTION😅😅
A palidrome is a number that ——————- —————————————-
Anonymous Quiz
13%
ends the looping by inputing a value from the user
10%
is sorted in either increasing or dcreasing order
65%
reads the same after reversing the original number
8%
is a merged number from two numbers
4%
NONE
❤1
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
look at the given choices and choose the incorrect alternative about function.
Anonymous Quiz
25%
a function without a parameter can be either left as free or void as parameter
19%
call function by reference indicates that the values of arguments are stored into function.
9%
default arguments are declared in function declaration, but no in function definition
16%
two different variables can have the same name
31%
the function call is similar to its declaration even the return type is not determined
0%
NONE
👍2🤩2
//a program to search a number from the array
#include <iostream>
using namespace std;
int main()
{
int rollno[10]={13,34,46,56,35,87,54,9,22,23};
int r,m=0;
cout <<"rollno is given below as follows: \n";
for(int i=0;i<10;i++){
cout <<rollno[i] <<" ";
}
cout <<"\n enter your rollno from the given: \n";
cin >>r;
for(int i=0;i<10;i++)
{
if(r==rollno[i]){
cout <<"your rollno is found at: " << i+1;
m=1;
}
}if(m==0){
cout <<"rollno is not found!";
}
return 0;
}
https://t.me/PROGRAMINGLANGUAGES1
#include <iostream>
using namespace std;
int main()
{
int rollno[10]={13,34,46,56,35,87,54,9,22,23};
int r,m=0;
cout <<"rollno is given below as follows: \n";
for(int i=0;i<10;i++){
cout <<rollno[i] <<" ";
}
cout <<"\n enter your rollno from the given: \n";
cin >>r;
for(int i=0;i<10;i++)
{
if(r==rollno[i]){
cout <<"your rollno is found at: " << i+1;
m=1;
}
}if(m==0){
cout <<"rollno is not found!";
}
return 0;
}
https://t.me/PROGRAMINGLANGUAGES1
🔥2
#QUESTION TO ANSWER IN C++
Write a program that prompts a user to enter the number of second elapsed for an event and converts this to m hours, n minute and p seconds. For example if the user enter 7840, the program display 2:10:40.
THE ANSWER IS LOADING....
https://t.me/PROGRAMINGLANGUAGES1
Write a program that prompts a user to enter the number of second elapsed for an event and converts this to m hours, n minute and p seconds. For example if the user enter 7840, the program display 2:10:40.
THE ANSWER IS LOADING....
https://t.me/PROGRAMINGLANGUAGES1
❤3
ANSWER for ✍️👉🏿https://t.me/PROGRAMINGLANGUAGES1/162
#include <iostream>
using namespace std;
int main()
{
int x;
cout << "inter time elapsed in second:" << endl;
cin >> x ;
int m = x/3600;
x = x% 3600;
int n = x/60 ;
x = x% 60;
int p = x;
cout << m <<"hours" <<":"<< n <<"minutes"<<":" << p <<"seconds!"<< endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int x;
cout << "inter time elapsed in second:" << endl;
cin >> x ;
int m = x/3600;
x = x% 3600;
int n = x/60 ;
x = x% 60;
int p = x;
cout << m <<"hours" <<":"<< n <<"minutes"<<":" << p <<"seconds!"<< endl;
return 0;
}
Telegram
LEARN TO CODE
#QUESTION TO ANSWER IN C++
Write a program that prompts a user to enter the number of second elapsed for an event and converts this to m hours, n minute and p seconds. For example if the user enter 7840, the program display 2:10:40.
THE ANSWER IS LOADING....…
Write a program that prompts a user to enter the number of second elapsed for an event and converts this to m hours, n minute and p seconds. For example if the user enter 7840, the program display 2:10:40.
THE ANSWER IS LOADING....…
👍2
