This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Enter two numbers:" | |
read a | |
read b | |
echo "Enter choice:" | |
echo "1. Addition" | |
echo "2. Subtraction" | |
echo "3. Multiplication" | |
echo "4. Division" | |
read ch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v <- c(7,12,28,3,41) | |
t <- c(14,7,6,19,3) | |
plot(v,type = "o",col = "red", xlab = "Month", ylab = "Rainfall (mm)", | |
main = "Rainfall Chart") | |
lines(t, type = "o", col = "blue") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Enter name of directory: " | |
read CHDIR | |
cd $CHDIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "*** Converting between different temperature units ***" | |
echo "1. Convert Celsius temperatures into Fahrenheit" | |
echo "2. Convert Fahrenheit temperatures into Celsius" | |
echo -n "Select your choice (1-2): " | |
read choice | |
if [ $choice -eq 1 ] | |
then | |
echo -n "Enter temperature (C): " | |
read tc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a-scene> | |
<a-camera position='0 0 3' user-height='0'></a-camera> | |
<a-sphere src="https://raw.githubusercontent.com/aframevr/sample-assets/master/assets/images/space/earth_atmos_4096.jpg" radius="1.5" segments-height="53"> | |
<a-animation attribute="rotation" | |
dur="10000" | |
fill= "forwards" | |
to="0 360 0" | |
easing="linear" | |
repeat="indefinite"></a-animation> | |
</a-sphere> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
int main() { | |
float a, b, c, x1, x2, discriminant, realPart, imaginaryPart; | |
cout << "Enter coefficients a, b and c: "; | |
cin >> a >> b >> c; | |
discriminant = b*b - 4*a*c; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int n; | |
long double factorial = 1.0; | |
cout << "Enter a positive integer: "; | |
cin >> n; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int year; | |
cout << "Enter a year: "; | |
cin >> year; | |
if (year % 400 == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int n, range; | |
cout << "Enter an integer: "; | |
cin >> n; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <iostream> | |
using namespace std; | |
int main() { | |
char op; | |
float num1, num2; | |
cout << "Enter operator: +, -, *, /: "; | |
cin >> op; |