klimi
Some programmer to help me
Just ask your question
klimi
Hola alguien habla español?
Si pero este grupo es solamenta en ingles
.
What's the problem?
I want to make a code
klimi
And what's the problem?
klimi
(What's the problem with writing the code)
.
It is difficult for me how to do it
klimi
Well that's unfortunate isn't it...
.
Yes
.
OK thank you
.
Well, the problem is that I am new to programming and they let me make a code with things that I have not seen and it is more difficult like that
klimi
Ya, that happens
.
Yes 😔
Anonymous
can someone help me
Anonymous
for just one question
klimi
Ask the question right away, no need to ask to ask
Anonymous
ı didnt send the photo of question
klimi
Photo of a question? Questions tend to be in text form
Apk
ı didnt send the photo of question
Which exam are you giving?
Anonymous
Write a C++ program to take array size to the user then fill the array with random numbers between 300 and 3000. After that separate array in two small array. Put divisors of 5 in first array after that put divisors 2 or 3 in another array and lastly put divisors of 7 in third array. At the end show arrays to the user.
Anonymous
this my question I can't solve this
Anonymous
ı have an question but my answer is true or false ı'm not really know could you check pls ?
Anonymous
Write a C++ program to take array size to the user then fill the array with random numbers between 300 and 3000. After that separate array in two small array. Put divisors of 5 in first array after that put divisors 2 or 3 in another array and lastly put divisors of 7 in third array. At the end show arrays to the user.
#include <iostream> using namespace std; int main() { int arr[100],n; int j=0,k=0,l=0; int count5=0,count7=0,count2or3,Divisor5[100],Divisor2or3[100],Divisor7[100]; int upper=3000,lower=300; cout<<"enter the size of array: "; cin>>n; for(int i=0;i<n;i++) { arr[i]=rand()%(upper-lower + 1) + lower; } cout<<endl<<"displaying all generated data: "; for(int i=0;i<n;i++) cout<<arr[i]<<" "; for(int i=0;i<n;i++) { if(arr[i]%5==0) { Divisor5[j]=arr[i]; j++; } if(arr[i]%2==0 || arr[i]%3==0) { Divisor2or3[k]=arr[i]; k++; } if(arr[i]%7==0) { Divisor7[l]=arr[i]; l++; } } cout<<"\nDisplaying divisor of 5: "; for(int i=0;i<j;i++) { cout<<Divisor5[i]<<" "; } cout<<"\nDisplaying divisor of 2or3: "; for(int i=0;i<k;i++) { cout<<Divisor2or3[i]<<" "; } cout<<"\nDisplaying divisor of 7: "; for(int i=0;i<l;i++) { cout<<Divisor7[i]<<" "; } return 0; }
Anonymous
could you check pls?
@@♥️P...A..♥️
Anyone frm India here
Talula
could you check pls?
Check and do what?
Anonymous
it gives an error
Anonymous
arr[i]=rand()%(upper-lower + 1) + lower;
Anonymous
this part
Anonymous
arr[i]=rand()%(upper-lower + 1) + lower;
#include <cstdlib> C++ has better random library support but I guess rand() should be ok for a school test.
Rohan
arr[i]=rand()%(upper-lower + 1) + lower;
Use this in your code #include<cstdlib>
Anonymous
ah okay tnx
@@♥️P...A..♥️
Yup
Grt
Rohan
Was that the only question you wanted to ask here? 😅
AKILA
Plz help me to setup gtk development on ubuntu
AKILA
😂
AKILA
Plz tell me how to setup 😉 gtk
Anonymous
any google pages?
Sachin
Yup
yes
Sachin
#include <stdio.h> int main () { // 0 1 2 3 4 int a[] = { 14, 13, 15, 7, 8 }; int i, j, min, temp, k,comp; for (i = 1; i <= 4; i++) { comp = i; for (j = i - 1; j >=0 ; j--) { if ( a[j] > a[comp] ) { temp = a[j]; a[j] = a[comp]; a[comp] = temp; comp = j; } } } printf ("\nSorted list:\n"); for (i = 0; i < 5; i++) printf ("%3d\t", a[i]); return 0; } is this insertion short ?
Sachin
no
Sachin
go through it one more please
Rohan
Oh ok
Sachin
Oh ok
are you done?
.
Why am I getting an error?
.
#include<stdio.h> #include <stdlib.h> struct libro{ char titulo[50]; char autor[40]; char editorial[40]; char fecha[20]; int isbn; int pag; }; int main(){ int NumeroLibros=2; libro recursos[NumeroLibros]; printf("\t\t sistema de registro de libros\n\n"); system("cls");48 for(int i=0;i<NumeroLibros;i++) { printf("ingrese el titulo del libro"); scanf("%s",recursos[i].titulo); fflush(stdin); printf("ingrese el nombre del autor"); scanf("%s",recursos[i].autor); fflush(stdin); printf("ingrese la fecha de publicacion"); scanf("%s",recursos[i].fecha); fflush(stdin); printf("ingrese la editorial del libro"); scanf("%s",recursos[i].editorial); fflush(stdin); printf("ingrese el isbn del libro"); scanf("%i",&recursos[i].isbn); fflush(stdin); printf("ingrese la cantidad de paginas del libro"); scanf("%i",&recursos[i].pag); fflush(stdin); } [2/6 9:41 a. m.] Saul Cituk: system("cls"); printf("\t\t sistema de registro de libros\n\n"); for(int i=0;i<NumeroLibros;i++) { printf("Libro no. %i \n", i+1); printf("libro ...> %s \n",recursos[i].titulo); printf("nombre del autor ...> %s \n",recursos[i].autor); printf("fecha de publicacion...> %1.1f\n",recursos[i].fecha); printf("editorial del libro ...> %1.1f\n",recursos[i].editorial); printf("isbn ...> %1.1f\n",recursos[i].isbn); printf("Paginas .> %1.1f\n",recursos[i].pag); } return 0;
Anonymous
your code is dirty
Ayush Kumar
#include<stdio.h> #include <stdlib.h> struct libro{ char titulo[50]; char autor[40]; char editorial[40]; char fecha[20]; int isbn; int pag; }; int main(){ int NumeroLibros=2; libro recursos[NumeroLibros]; printf("\t\t sistema de registro de libros\n\n"); system("cls");48 for(int i=0;i<NumeroLibros;i++) { printf("ingrese el titulo del libro"); scanf("%s",recursos[i].titulo); fflush(stdin); printf("ingrese el nombre del autor"); scanf("%s",recursos[i].autor); fflush(stdin); printf("ingrese la fecha de publicacion"); scanf("%s",recursos[i].fecha); fflush(stdin); printf("ingrese la editorial del libro"); scanf("%s",recursos[i].editorial); fflush(stdin); printf("ingrese el isbn del libro"); scanf("%i",&recursos[i].isbn); fflush(stdin); printf("ingrese la cantidad de paginas del libro"); scanf("%i",&recursos[i].pag); fflush(stdin); } [2/6 9:41 a. m.] Saul Cituk: system("cls"); printf("\t\t sistema de registro de libros\n\n"); for(int i=0;i<NumeroLibros;i++) { printf("Libro no. %i \n", i+1); printf("libro ...> %s \n",recursos[i].titulo); printf("nombre del autor ...> %s \n",recursos[i].autor); printf("fecha de publicacion...> %1.1f\n",recursos[i].fecha); printf("editorial del libro ...> %1.1f\n",recursos[i].editorial); printf("isbn ...> %1.1f\n",recursos[i].isbn); printf("Paginas .> %1.1f\n",recursos[i].pag); } return 0;
Remove unnecessary stuff in this code. it will work.
ɴꙩᴍᴀᴅ
#include<stdio.h> #include <stdlib.h> struct libro{ char titulo[50]; char autor[40]; char editorial[40]; char fecha[20]; int isbn; int pag; }; int main(){ int NumeroLibros=2; libro recursos[NumeroLibros]; printf("\t\t sistema de registro de libros\n\n"); system("cls");48 for(int i=0;i<NumeroLibros;i++) { printf("ingrese el titulo del libro"); scanf("%s",recursos[i].titulo); fflush(stdin); printf("ingrese el nombre del autor"); scanf("%s",recursos[i].autor); fflush(stdin); printf("ingrese la fecha de publicacion"); scanf("%s",recursos[i].fecha); fflush(stdin); printf("ingrese la editorial del libro"); scanf("%s",recursos[i].editorial); fflush(stdin); printf("ingrese el isbn del libro"); scanf("%i",&recursos[i].isbn); fflush(stdin); printf("ingrese la cantidad de paginas del libro"); scanf("%i",&recursos[i].pag); fflush(stdin); } [2/6 9:41 a. m.] Saul Cituk: system("cls"); printf("\t\t sistema de registro de libros\n\n"); for(int i=0;i<NumeroLibros;i++) { printf("Libro no. %i \n", i+1); printf("libro ...> %s \n",recursos[i].titulo); printf("nombre del autor ...> %s \n",recursos[i].autor); printf("fecha de publicacion...> %1.1f\n",recursos[i].fecha); printf("editorial del libro ...> %1.1f\n",recursos[i].editorial); printf("isbn ...> %1.1f\n",recursos[i].isbn); printf("Paginas .> %1.1f\n",recursos[i].pag); } return 0;
system("cls");48 <-- what is 48 doing there?
$lick $loth
Hi
$lick $loth
Can someone help me with ac programming test?
$lick $loth
The language is c
Anonymous
Very good language
Anonymous
I think you should do it by yourself
Anonymous
Any one
Yes. This is insertion sort.
$lick $loth
I really need help I don't know anything and it's Monday
Sachin
Yes. This is insertion sort.
where are you from?
olli
Anyone having simplest approach on finding first non repetitive element in a word/string. Time complexity doesn't matter.
the simplest approach is probably: for every character in the string, go over that string again and see if it appears a second time Time: O(n^2) Space: O(1) e.g. like this const char * FindFirstRepeating(const char * Str) { const char *Current; const char *It; if (!Str) { return 0; } Current = Str; for (Current = Str; *Current != '\0'; ++Current) { It = Current; for (It = Current + 1; *It != '\0'; ++It) { if (*It == *Current) return It; } } return 0; }
meis
@boofmaq
what's the type of test?
$lick $loth
It is an extraordinary exam of the UNAM
Hannah
Can I get a programmer here
Hannah
I want source code on project topic Design and implementation of a graphical tutoring system
Kwabena
Explain how one can determine if two prime numbers are twin prime. Twin primes are consecutive prime numbers, for example 1 and 2, 2 and 3, 3 and 5, 5 and 7, 7 and 11, etc Any help on this
Pavel
Why do you ask?
Anonymous
Help