diff --git a/C/Matrix-Multi.c b/C/Matrix-Multi.c new file mode 100644 index 0000000..df4af92 --- /dev/null +++ b/C/Matrix-Multi.c @@ -0,0 +1,29 @@ +#include + +int main() +{ +int a[3][3],b[3][3],c[3][3],i,j,k; + +for (i=0;i<3;i++) + { for (j=0;j<3;j++) + scanf("%d",&a[i][j]); + } +for (i=0;i<3;i++) + { for (j=0;j<3;j++) + scanf("%d",&b[i][j]); + } + +for (i=0;i<3;i++) + { for (j=0;j<3;j++) + {c[i][j]=0; + for (k=0;k<3;k++) + { + c[i][j]+=a[i][k]*b[k][j]; + }}} +for (i=0;i<3;i++) + { for (j=0;j<3;j++) + { printf("\t%d",c[i][j]); + } + printf("\n");} +return 0; +} diff --git a/python/split-join-string.py b/python/split-join-string.py new file mode 100644 index 0000000..070ba04 --- /dev/null +++ b/python/split-join-string.py @@ -0,0 +1,29 @@ +# Python program to split a string and +# join it using different delimiter + +def split_string(string): + + # Split the string based on space delimiter + list_string = string.split(' ') + + return list_string + +def join_string(list_string): + + # Join the string based on '-' delimiter + string = '-'.join(list_string) + + return string + +# Driver Function +if __name__ == '__main__': + string = 'Rahul Goyal' + + # Splitting a string + list_string = split_string(string) + print(list_string) + + # Join list of strings into one + new_string = join_string(list_string) + print(new_string) +