Hasem
Hii i am look for someone who help me to di my üniversite C homework İ have 2 C homework and i will $100 for that please if someone want to help me please text me
あおい ハート
try input 5 5
Then 5 5 output comes
あおい ハート
try input 5 5
Actually problem is when i input the decimal value for int variable then all other input are not asked and assigned as 0 why this happening?
あおい ハート
it works
Yaa 5 and 5 are int it works 👍
あおい ハート
maybe because stream is set in error state
Am not getting it is there something wrong with my pc 😅
Alex
Am not getting it is there something wrong with my pc 😅
no, I assume cin is set to error state if you provide wrong data. refer to documentation
Prajal
Anyone suggest me A telegram group for daily quizes and practise problem related to c++ or data structure and algorithm
Prajal
Why telegram group? Use websites like hackerRank
If any such group exist.. Then its beneficial for me
Gullu
i am new here i want to start C language.. can u guide me.. from where i have to start
Gullu
notes any study material
Gullu
thank u
Anonymous
hey there . while finding Maximum number instead of assigning yourself 0 to the maximum variable. To find maximum number what is alternate method the minimum number is assigned itself it is so I can can test negative numbers as well.
Anonymous
for example Code : int max=0; int arr[10]={1,2,3,4,5,6,7,8,9,10} for(int i=0;i<10;i++) { if(arr[i]>max) max=arr[i]; }
Anonymous
what can I use in place of max=0 instead of a minimum negative number . is there a keyword for minimum number?
Fabio
You could put max=arr[0]
Igor🇺🇦
for example Code : int max=0; int arr[10]={1,2,3,4,5,6,7,8,9,10} for(int i=0;i<10;i++) { if(arr[i]>max) max=arr[i]; }
first of all you don't have to assign 0 or any random number at all. You can use arr[0] If you want to know minimum number it's defined here: for C https://cplusplus.com/reference/climits/ and for C++ here https://en.cppreference.com/w/cpp/types/numeric_limits
Fabio
Someone could solve this problem? A number in input show in output the level of pascal triangle Example: If I put 1 it will give me 1, if I put 2 it will give me 1 1, if I put 3 it will give me 1 2 1
Fabio
Using what c or ++
Everything you want
Fabio
But you can use only while, for, if, and array no other stuff
Anonymous
Okay let me see
Fabio
https://www.geeksforgeeks.org/pascal-triangle/
There is stuff that I don't know how it works
Igor🇺🇦
Only this I know
There are only for, if, and function to print there. 🤷‍♂️
Anonymous
But you can use only while, for, if, and array no other stuff
#include <stdio.h> int main() { int i, j, rows; printf("Enter the number of rows: "); scanf("%d", &rows); for (i = 1; i <= rows; ++i) { for (j = 1; j <= i; ++j) { printf("* "); } printf("\n"); } return 0; }
Hasan Emre
#include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; struct element{ int data; element* next; }; element* root = new element(); void olustur(element *ptr) { for (int i=1;i<=10;i++) { ptr->data = i*10; ptr->next = new element; ptr = ptr->next; } ptr->next = NULL; } void swap(element *ptr, int sira) { element *ptr2 = new element; for(int i=1;i<sira;i++) { ptr= ptr->next; } ptr2 = ptr->next; ptr->next= NULL; while(ptr2->next != NULL) { ptr2 = ptr2->next; } ptr2->next = new element; ptr2->data = 111; ptr2 = ptr2->next; ptr2->next=root; } void yazdir(element* ptr){ while(ptr->next != NULL) { cout<<ptr->data<<endl; ptr = ptr->next; } } main() { olustur(root); swap(root,5); yazdir(root);
Hasan Emre
How do I split a list in half and add the second part before the 1st part?
Sandro
How do I split a list in half and add the second part before the 1st part?
I've prepared for you (and others) a collection of function where you can find some simply solution to manage linked list in C. But plz, read the disclaimer first!
Sandro
For your convenience I put all the code in one sourcing file, but remember that the right way is to use headers for definitions, declarations and so on and .c files for routines
Sandro
https://pastebin.com/wmuL89kw
Hasan Emre
Bron Pastebin banned in Turkey
Hasan Emre
That's why I can't access the code
Sandro
Try again, pick on the link
Hasan Emre
Not happening
Hasan Emre
Because the site is banned
Hasan Emre
İn Turkey
Sandro
I've sent you in PM
Vinícius
/get ide
Halil Aytaç
Emre pastebini de mi banladı oçları
Pavel
If you are in c++ then use INT_MIN and include the library climits
I think using std::numeric_limits<int>::lowest() is more preferable in C++ since INT_MIN is not standard Ah wait, is INT_MIN actually in standard?
Anonymous
Hello
Anonymous
How can I make a voice chat c++ socket ?
Ahmed Mohy
Hi am new and I studied at computer science I need full c++ course and wht should first learn ?
Fabio
Well theory
Fabio
How a programm works
Fabio
Then you need to learn how to write it so you need to start with the basic stuff
Ahmed Mohy
How a programm works
First Is this college good or no
Ahmed Mohy
Wht about program language how many language should I learn ?
Fabio
It depends on what you want to do
Fabio
For websites html for games phyton or java
Fabio
C and c++ are very similar so you could learn only one of them then you could go to learn java then html
Ahmed Mohy
Can u advise me
Ahmed Mohy
?
Fabio
Start from c++
Ahmed Mohy
Ahmed Mohy
??
Fabio
Search on internet
Fabio
Video lessons on YouTube
Ahmed Mohy
Ok I need to be perfect on pc games developer
Jaaa
If i has a stirng ABC then it contain a substrng AC. or not🤨
Anonymous
Dear I like to learn these languages
Anonymous
👍
Anonymous
Hi
Prajal
If i has a stirng ABC then it contain a substrng AC. or not🤨
ABC have 2³ substring And one of them is AC
Jaaa
ABC have 2³ substring And one of them is AC
But substring is a Contiguous part ??
Prajal
But substring is a Contiguous part ??
If there is additional condition substring in contiguous Then No
Anonymous
Is there any python channel?