Anonymous
Mariam
#include <iostream>
using namespace std;
int main()
{
int t;
cin >> t;
long long s, a, b, c;
while (t--)
{
cin >> s >> a >> b >> c;
}
int p = (s - a * c) / c;
while(t- -){
{
cout << p + a + (a * b);
}
}
return 0;
}
Mariam
Hello can you tell me How do I not fall into its endless cycle??
the best for everyone
can anyone tell me how to make the logic of time to check seconds and minute and hours
Anonymous
Mariam
Kriss
Anybody done that HRML markup language challenge on hackerarank ? If yes that can u give me a hint or something
Kriss
Kriss
Anonymous
Light
#include <stdio.h>
int fun(char *x, char *y){
char player;
player = x;
printf("%s\n", player);
return 0;
}
int main(){
char x[20] = "X";
char y[20] = "Y";
fun(&x, &y);
return 0;
}
How can I assassin x value to player?
klimi
Light
I want to save *x and *y value to player so that I can use work with them
dipan
#include<stdio.h>
void main()
{
int matrix1[10][10],i,j,m,n;
printf("enter the row and column of matrix1");
scanf("%d%d",&m,&n);
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&matrix1[i][j]);
}
}
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
printf("%d\t",matrix[i][j]);
}
printf("\n");
}
}
dipan
i was trying to display matrix of row column m*n it didnot worked
dipan
anyone plz correct this
Safwan
What's the error showing?
Jemin
#include<stdio.h>
void main()
{
int matrix1[10][10],i,j,m,n;
printf("enter the row and column of matrix1");
scanf("%d%d",&m,&n);
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&matrix1[i][j]);
}
}
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
printf("%d\t",matrix1[i][j]);
}
printf("\n");
}
}
Safwan
dipan
Ok thanks bro
dipan
1 was missing there
Anonymous
@Habibi_158 , Jemin Stick to English. Read the rules.
ʟᴏɴᴇᴡᴏʟꜰ
What are some good resources for learning c++ ?
ʟᴏɴᴇᴡᴏʟꜰ
Any book, tutorial or videos
Дон
ʟᴏɴᴇᴡᴏʟꜰ
Anonymous
Anonymous
Saint Paul
Hi every I'm trying to set Region of Interest with PLC but it doesn't work for me . Any idea please ?
Dinuka
Hi, i have non related to C programming question.
(-9)*(-11)
Convert these 2 decimal numbers into binary and multipy. When i try to solve this. Always getting wrong answer. Any body can help me to solve this?
Дон
Dinuka
How looks your converting function?
Seems like i do it wrong. 1st i convert to binary and get two's complement. But both negative numbers, so i do not need to get two's complement right?
Дон
ɛ n h ᴀ n c ɛ ґ 🧟♂️
pastebin.com/3h7inWnq
If anyone could go through this code and and tell me which part I’ve made an error I’ll be very glad (it’s about displaying content of a linked list)
Compiler doesn’t show any error but the values are not being displayed
Dinuka
Philklin
Please I'm new in C++ programming
Someone should lecture me please 🙏
Captain
Captain
Also for display function you should check if ptr becomes null in while condition which will print all elements
Oda Waves
Hey guys i am trying to open falsh file on internet but when i used ruffle it gives me that message
(This content contains ActionScript 3 which not yet supported by Ruffle emulator)
, do you know any application , i can use
Note : adobe not working anymore from 31 Dec 2020
ɛ n h ᴀ n c ɛ ґ 🧟♂️
Anonymous
Write a program in C to find the square of any number using the function
Anonymous
Kriss
#include <iostream>
int main(){
int ages[5];
for(int i =0 ; i < 5 ; i++ ){
std::cin >> ages[i] ;
}
int size = sizeof(ages)/sizeof(int);
float total = size * 10 ;
for(int j =0 ; j >5 ; j++){
int min = ages[i];
if ( min < ages[j+1]){
min = ages[j +1];
}
else {
min = ages[j];
}
}
std::cout << min;
-----end------
In the above code I want to print the value of _min_ variable which is in for loop but I cannot as it is out of scope and if I declare the variable outside ,it prints the value which is not affected by for loop
Kriss
*ages[j]
ɛ n h ᴀ n c ɛ ґ 🧟♂️
Clash
bool mycmp(pair<int,int> a,pair<int,int> b)
{
return a.second<b.second;
}
int activitySelection(vector<int> start, vector<int> end, int n)
{
int res=1;
vector<pair<int,int>> arr;
for(int i=0;i<start.size();i++)
{
arr[i].first=start[i];
arr[i].second=end[i];
}
sort(arr.begin(),arr.end(),mycmp);
int prev=0;
for(int curr=1;curr<n;curr++)
{
if(arr[curr].first>arr[prev].second)
{
res++;
prev=curr;
}
}
return res;
}
};
in this code that mycmp function is not working
Дон
Kriss
*ages[j]
Are u pointing out ages[i]?
Kriss
Дон
.
j > 5? Maybe j < 5?
And check this line:
int min = ages[i]; //i - local variable for first loop, didn't exist
Kriss
Kriss
ɛ n h ᴀ n c ɛ ґ 🧟♂️
Kriss
artemetra 🇺🇦
nooby question about C
suppose i have this struct:
typedef struct A {
uint8_t some_array[6];
uint8_t some_int;
} A;
and suppose i have a pointer to it, say A_ptr
when accessing some_array through the -> operator (A_ptr->some_array), do i get the pointer to the array?
and when accessing some_int the same way, is it the pointer to the int or the value itself?
artemetra 🇺🇦
i guess the array decays into a pointer but i'm not that familiar with that (i mostly used C++ before)
pavel
The same as in c++
pavel
Some array - pointer, some int - value
Pavel
artemetra 🇺🇦
inspiroman
those who says they are good coders of any language dm me.
Manan Bhateja
Kriss
Int x= 17;
double y = 1/x;
std::cout << y;
Why y is zero?
Pavel
Kriss
Дон
Anonymous
Good morning Team
Anonymous
Past 4 days
Anonymous
I'm looking for how to read XML file in c programming language
Anonymous
Kindly anyone share code for that
Anonymous
Does anyone have a qt group?