224 questions
#define _crt_secure_no_warnings#define size 5#include<stdio.h>void GetIntArray(int* v, int n);int Isinclude(int* v, int n, int val);int main(){ int v[size]; int n = 5; int val; printf(Enter val:...
I got 123456 inputI'm trying to print out 321654 What's wrong with my form??int main() { int t = 0; char str1[4]; char str2[4]; cin >> str1 >> str2; char str1copy[4] = { 0 }; char str2copy...
After making a two-dimensional array using random numbers,A program that outputs an array in a two-dimensional table after obtaining the sum of each row and each column.But if you compare the table wi...
#include <stdio.h>#include <time.h>#define ROWS 20#define COLS 20int main(void){ srand((unsigned)time(NULL)); char dot[ROWS][COLS]; for (int i = 0; i < ROWS; i++) { for (int j = 0; j &...
It takes an integer from the array and outputs the element and difference of the most approximate value.The desired terminal output is as follows.[ 10 20 30 40 50 60 70 80 90 ]Enter an integer: 23The ...
When you declare a two-dimensional array dynamic assignment and enter the number of rows and columns, you want all the elements in the array to be initialized to 0.0, but I'm not sure what's wrong. vo...
#include <stdio.h>#include <stdlib.h>int main(){ int cnt, i, j; printf (How many numbers do you want to enter? : ); scanf_s(%d, &cnt); int* arr = (int*)malloc(sizeof(int)*cnt); int* ar...
int s[] = {0,10,20,30,40,50,60,70,80,90,100}; int number, index = -1; int i; Scanner scan = new Scanner(System.in); System.out.println (Enter a value to explore).:); number = scan.nextInt(); fo...
var name = ['a', 'b', 'c']; name.push('d'); There was an error doing this.name.push is not a functionHowever, there was no problem because the variable name was changed from name to a as follows. var ...
« | - 22 - | » |
© 2024 OneMinuteCode. All rights reserved.