This file contains 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 <math.h> | |
using namespace std; | |
int main() | |
{ int a[3][3],i , j ,sum ,s ; | |
cout << "Norm matrix in 2D array " << endl ; | |
cout << "Enter Array Elements : " << endl ; | |
// loop for taking input of array elements |
This file contains 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 i , j , sum = 0 , a[3][3] ; | |
cout << "Trace matrix in 2D array " << endl ; | |
cout << "Enter Array Elements : " << endl ; | |
// loop for taking inputs in array |
This file contains 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 a[3][3] , n , i ,j ; | |
cout << "Linear Search in 2D Array" << endl; | |
cout << "Enter number which you have to find in array :" << endl ; | |
cin >> n ; | |
cout << "Enter array elements : " << endl ; |
This file contains 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 i, j; | |
// input array | |
int a[3][3]; | |
// transpose array |
This file contains 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
class Person: | |
def __init__(self, name, age): | |
self.name = name | |
self.age =age | |
def myfunct(self): | |
print("Printed by mufunct") | |
print("Hello !! My name is ",self.name) | |
print("I am ",self.age," years old.") |
This file contains 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
#Program to print star pattern | |
#* * * * * * | |
#* * * * * | |
#* * * * | |
#* * * | |
#* * | |
#* | |
for i in range (0,6): | |
for j in range (0,6-i): | |
print("* ",end="") |
This file contains 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
#Program to print star pattern | |
#* | |
#* * | |
#* * * | |
#* * * * | |
#* * * * * | |
#* * * * * * | |
for i in range(1,6): | |
for j in range(1,i+1): | |
print("*",end=" ") |
This file contains 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
#Program to print pattern star pattern | |
# ***** | |
# **** | |
# *** | |
# ** | |
# * | |
n=6 | |
for i in range (1,n): | |
for j in range (1,i,1): | |
print(" ",end="") |
This file contains 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
#Program to print star pyramid pattern | |
# * | |
# * * | |
# * * * | |
# * * * * | |
for i in range (1,6): | |
for j in range(5,i,-1): | |
print(" ",end="") | |
for k in range(1,i): | |
print("* ",end="") |
This file contains 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
#Program to print star pyramid pattern | |
# * | |
# * * | |
# * * * | |
# * * * * | |
for i in range (1,6): | |
for j in range(5,i,-1): | |
print(" ",end="") | |
for k in range(1,i): | |
print("* ",end="") |
NewerOlder