0% found this document useful (0 votes)
20 views2 pages

14

Uploaded by

Israt Diba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

14

Uploaded by

Israt Diba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1)

Filea. C

int main(void) {
helloo();
return 0;
}

Fileb. C

#include <stdio.h>

void helloo(void) {

printf("Helloo,... World!\n");

Save both files in the same location and run in the command prompt and
execute the file.

2)
C++ program to swap numbers.

#include <iostream>
using namespace std;

int main()
{
int a = 5, b = 10, temp;

cout << "Before swapping two numbers ." << endl;


cout << "a = " << a << ", b = " << b << endl;

temp = a;
a = b;
b = temp;

cout << "\nAfter swapping two numbers ." << endl;


cout << "a = " << a << ", b = " << b << endl;

return 0;
}
Java program to Multiply two floating number

public class MultiplyTwoNumbers {

public static void main(String[] args) {

float first = 1.5f;


float second = 2.0f;

float product = first * second;

System.out.println("The product of two floating number is: " + product);


}
}

4)
Simple Bash script
#!/bin/bash
echo "Enter user Name"
read name
echo "Welcome $name to bash script "

Running this bash script

$ bash user_input.sh

You might also like