why does this code prints ” ” instead of “.” however it prints the other elements correctly?
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(0) , cin.tie(NULL) , cout.tie(NULL) ; int n , m , t ; cin >> n >> m >> t ; char arr[n][m] = {‘.’} ; while ( t– ) { int r1 , r2 , c1 , c2 ; char ch ; cin >> r1 >> […]
Did I solve this Task for C# Programming correctly? Are there ways to make my code cleaner/easier?
The task is:
The program you are given defines an array with 10 words and takes a letter as input.
Write a program to iterate through the array and output words containing the taken letter.
If there is no such word, the program should output “no match”.
Does my loop do what I described or is it doing something else?
So I’m a newbie programmer in C# and in a school course we are suppose to compare two differnet arrays with each other. The instructions we were given were that each number in the first array would be compare to each number in the second array, and if no match were found move over to the next index in the first array. I’m not sure if I’m explaining that in a good way so here’s an example: