Arama butonu
Bu konudaki kullanıcılar: 2 misafir
4171
Cevap
168575
Tıklama
3
Öne Çıkarma
Cevap: C/C++/C# Sorularınız Buraya. . .(GÜNCEL) (115. sayfa)
S
12 yıl
Çavuş

quote:

Orijinalden alıntı: MrOwl

quote:

Orijinalden alıntı: Sebastian54

C#
selam arkadaşlar bi sorum olacak
form1 ve form 2 var
form1 de groupbox içinde kull.adı ve şifre giriliyor
form2 de başarılı giriş veya değil yazıyor burda sorun yok ama istiyorum ki form1 de kull.adı ve şifre 3 kere yanlış girildimi form1 deki groupbox kitlensin groupbox ı form2 den yönetemiyorum form2 de girmeliyim bu kodu çünkü koşullarım form2 de yazılı (yardım etmek isteyip de tam anlamayan olursa kodları yazarım burada)

Ana işlerin olduğu formun üzerine giriş formunu açarsanız sorun olmayacaktır diye düşünüyorum. Bu tarz programlarda genelde kilit nokta bu oluyor. Siz nasıl hazırladınız bilmiyorum, kodları paylaşabilirseniz yardımcı olmaya çalışırım.

Bu form2 deki kod form1 de sadece form2 aç butonu ve kull.adı ve şifre giriniz var
 public partial class Form2 : Form 
{
public Form2()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
int i=0;
private void Form2_Load(object sender, EventArgs e)
{

if (Form1.kullanici == "sinan" && Form1.sifre == "123")
{

i = 0;
label2.Text = "Giris Başarılı";
}
else
label2.Text = "Giriş Başarısız";
i++;
if (i == 3)

this.Close();


Bu mesaja 2 cevap geldi.
T
12 yıl
Binbaşı

#include <iostream> 
using namespace std;

int main(){
int count = 0;
int MIN;
do{
int numb;
cout << " Enter any integer : ";
cin >> numb;
if(count == 0)
MIN = numb;
if(MIN > numb)
MIN = numb;
count++;
}while(count <= 10);
cout << " MIN NUMB IS : " << MIN;
}


9. soru biraz özensiz yaptım bu kadar uzun olmamalıydı k.bakma vaktim yoktu oldukça yapıcağım :)


Bu mesaja 2 cevap geldi.

Bu mesajda bahsedilenler: @şerlok
L
12 yıl
Yüzbaşı

4. Sorunun cevabı:
#include <iostream> 
using namespace std;

int main(int argc, char** argv) {

int number,prime,counter=0;

cout << "Enter an integer which is greater than 0: ";
cin >> number;

for(prime=1; prime<=number; prime++)
{
if(number%prime==0)
{
counter++;
}
}

if(counter==2)
{
cout << "\nThe number you enter is prime!";
}

else
{
cout << "\nThe number you enter is not prime!";
}

return 0;
}


Bu mesaja 1 cevap geldi.

Bu mesajda bahsedilenler: @şerlok
Ş
12 yıl
Yüzbaşı

Çok teşekkür ediyorum.Allah razı olsun.Biliyorum bu soruları siizn çözmeniz benim konuyu anlayacağım anlamına gelmiyor.5 veya 7 gün içerisinde dedemde taburcu oluyor.Böylece eksikliklerime çalışma fırsatım olacak.Tabi önce şu vizeden yüksek bir not almam lazım :)




Bu mesajda bahsedilenler: @TheApproachingCurve
Ş
12 yıl
Yüzbaşı

quote:

Orijinalden alıntı: LoRd1N

4. Sorunun cevabı:
#include <iostream> 
using namespace std;

int main(int argc, char** argv) {

int number,prime,counter=0;

cout << "Enter an integer which is greater than 0: ";
cin >> number;

for(prime=1; prime<=number; prime++)
{
if(number%prime==0)
{
counter++;
}
}

if(counter==2)
{
cout << "\nThe number you enter is prime!";
}

else
{
cout << "\nThe number you enter is not prime!";
}

return 0;
}


Çok teşekkür ederim.Sağolasın.Vaktin olursa eğer diğerlerine de göz gezdirirsen sevinirim :)


Bu mesaja 1 cevap geldi.
A
12 yıl
Er

C programlamaya yeni başladım.
main.c:(.text+0x3f): undefined reference to `fon'

diye bir hata alıyorum ne demek istiyor anlayamadım yardımcı olursanız çok sevinirim..


Bu mesaja 1 cevap geldi.
M
12 yıl
Yüzbaşı

quote:

Orijinalden alıntı: Sebastian54

quote:

Orijinalden alıntı: MrOwl

quote:

Orijinalden alıntı: Sebastian54

C#
selam arkadaşlar bi sorum olacak
form1 ve form 2 var
form1 de groupbox içinde kull.adı ve şifre giriliyor
form2 de başarılı giriş veya değil yazıyor burda sorun yok ama istiyorum ki form1 de kull.adı ve şifre 3 kere yanlış girildimi form1 deki groupbox kitlensin groupbox ı form2 den yönetemiyorum form2 de girmeliyim bu kodu çünkü koşullarım form2 de yazılı (yardım etmek isteyip de tam anlamayan olursa kodları yazarım burada)

Ana işlerin olduğu formun üzerine giriş formunu açarsanız sorun olmayacaktır diye düşünüyorum. Bu tarz programlarda genelde kilit nokta bu oluyor. Siz nasıl hazırladınız bilmiyorum, kodları paylaşabilirseniz yardımcı olmaya çalışırım.

Bu form2 deki kod form1 de sadece form2 aç butonu ve kull.adı ve şifre giriniz var
 public partial class Form2 : Form 
{
public Form2()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
int i=0;
private void Form2_Load(object sender, EventArgs e)
{

if (Form1.kullanici == "sinan" && Form1.sifre == "123")
{

i = 0;
label2.Text = "Giris Başarılı";
}
else
label2.Text = "Giriş Başarısız";
i++;
if (i == 3)

this.Close();


Bunu inceleyin, cevabı burada bulacaksınız. Ek olarak, derdinizi anlatırken düzgün cümle yapıları kullanın.

http://stackoverflow.com/questions/4345666/hiding-a-form-and-showing-another-when-a-button-is-clicked-in-a-windows-forms-ap



M
12 yıl
Yüzbaşı

quote:

Orijinalden alıntı: arzu-5838

C programlamaya yeni başladım.
main.c:(.text+0x3f): undefined reference to `fon'

diye bir hata alıyorum ne demek istiyor anlayamadım yardımcı olursanız çok sevinirim..

fon diye bir fonksiyon kullanmaya çalışmışsınız, fakat bu fonksiyonun bir referansı(prototipi) yok. Fonksiyonun prototipini tanımlanız gerek. En üste yazdığımız (örneğin)

int fon(int x, int y)

gibi.



T
12 yıl
Binbaşı

QUESTION 11
Write a program that gets a
number from the user and
finds the sum of the prime
numbers in its digits.

Answer
#include <iostream> 
#include <cmath>
using namespace std;


bool testAsal(int numb){
bool flag = true;

for(int k = 2; k < numb ; k++){
if((numb % k) == 0)
flag = false;
}
if(numb == 1)
flag = false;
if(numb == 2)
flag = true;
return flag;
}

int findZero(int number){
int bolum = number;
int count1 = 0;
while(bolum > 0){
bolum = bolum / 10;
count1++;}
return count1;
}

int main(){

int numb,numtest,zero,digit,sum = 0,firstNumb,baslangic;
cout << " Enter any integer : ";
cin >> numb;
zero = findZero(numb);
firstNumb = numb;
baslangic = zero;
if(zero > 3){
numtest = numb % 10;
if(numtest > 1){
if(testAsal(numtest) == true)
sum = numtest;}}



while(zero > 0){
zero = zero - 1;

digit = numb / pow(10,zero);

numb = numb - (digit * pow(10,zero));
if((zero == 0) && (baslangic < 3)){
digit = firstNumb % 10;
if(digit > 1){
if(testAsal(digit) == true){

cout<< digit << endl;
sum += digit;}}}

if((digit > 1)&& (zero > 0)){
cout << digit << endl;
if(testAsal(digit) == true){

cout<< digit << endl;
sum += digit;}
}

}

cout << sum;


}
çok karışık oldu comment yazamadım ancak kodu takip edip anlayabilirsin , normalde bu kadar uzun olmamalı amelece oldu biliyorum ama string kullanılarak 3 4 satırda bile yapılabilirdi ama bence hoca bunu aritmetik olarak istiyordur diye düşündüm gerçi aritmetik olsada bu kadar uzun olmamalıydı daha boş bir kafayla yeniden bakıp daha elegance birşey yazacağım şimdilik bu da bir çözüm :)
edit
Biraz anlatıyım iki fonksiyon oluşturdum biri asal sayı olup olmadığını test ediyor, asalsa true diyor, diğeri ise kaç basamaklı olduğunu buluyor sayının, bir while loopu oluşturdum burada zero - 1 dedim çünkü basamağının 1 eksiği 0 var örneğin 2133 sayısını açarsak 2*10^3 + 10^2 + 3*10^1 + 3*10^1 diye açarız yani 10 üzeri 3 ten baslıyor açılımdaki 10 unun üzeri bende her defasında while loopta bir eksilttim, ancak bu yaptığım programda 4 ve üstü basamağa sahip sayılarda son basamaktaki yani birler basamağındaki sayıyı okutamadım bundan dolayı kontrol ifadesi olan if i kullanarak birler basamağını döngüden önce kontrol ettim ve asalsa ilkin toplama kattım buradan kafana takılan olursa yanıtlamaya çalışırım kardeşim çok geçmiş olsun.





< Bu mesaj bu kişi tarafından değiştirildi TheApproachingCurve -- 14 Kasım 2013; 15:46:39 >
Bu mesaja 1 cevap geldi.

Bu mesajda bahsedilenler: @şerlok
Ş
12 yıl
Yüzbaşı

İlgi ve alakanız için sorularıma vakit ayırdığınız için herkese teşekkür ederim.4. 9. ve 11. soruları çözdük birkaç tane daha kaldı ;
QUESTION 0
* Suppose that you are asked to develop a cell phone
invoice calculator program.
* There are two types of tariffs for users:
* (1) the users that do not use any package are charged
0.15 TL/6 seconds
* (2) the 'eco' package users will pay 19 TL fixed fee for
first 50 minutes and 0.2 TL/6 seconds for extra
talking time that exceeds 50 minutes
* The program will get the total number of talking time
in terms of minutes (double type) and then calculate
and print the total amount that the user will pay for
each tariff type.
* Write the C++ source code of the above
program.
QUESTION 1
Write for and do-while structures
to compute the following products.
1 x (1 / 3) x (1 / 5) x ….x (1 / (n/2))
where n is an integer entered by the
user.
QUESTION 2
Write a C++ program that
gets a positive integer from
the user. The number will be
required until a positive
number is entered.
Find and print the factors of
the entered number.
QUESTION 3
#include<iostream>
int main()
{ int i,j,k,n;
cout << “How many rows?” << endl;
cin >> n;
for(i=n; i>0; i=i - 2)
{
cout << endl;
for(k=(i+1)/2; k>0; --k)
cout << “ “;
for(j=1;j <= i; ++j)
cout << “ &”;
}
}

QUESTION 5
Write a C++ program that prints
the prime numbers between 2 and
10000.
QUESTION 6
 The value of π can be approximated by using the
following series:
 Write a program that gets the value of n as a
parameter and returns the estimated value of π.
QUESTION 7
 Let n = akak-1ak-2. . .a1a0 be an.
 Find and display the sum of digits of n
(ak + ak-1 + ak-2 + …………… + a1 + a0)
 The number n will be entered by the user
QUESTION 8
 The population of a town A is less than the
population of town B.
 However, the population of town A is growing
faster than the population of town B.
 Write a program that prompts the user to enter
the population and growth rate of each town. The
program outputs after how many years the
population of town A will be greater than or
equal to the population of town B and the
populations of both the towns at that time.

QUESTION 10
 Write a program that gets an integer, say n, by
the user.
 The program than will get positive elements by
the user until 0 is entered.
 When 0 is entered, the program will display the
position of the last occurance of n.



T
12 yıl
Binbaşı

QUESTION 5
Write a C++ program that prints
the prime numbers between 2 and
10000.
Answer 1 - Amele Style :)
    int n = 2; 
cout << " " << n << " ";
cout << " " << n+1 << " " << n+2 << " " << n+3 << " ";
while(n < 10000){
if((n % 2) != 0)
if((n % 3) != 0)
if((n % 5) != 0)
if((n % 7) != 0)
cout << " "<< n << " ";
n++;}}

Answer 2 -Elegance
#include <iostream> 
using namespace std;

bool myAsal(int x){

bool check;
check = true;

for(int k = 2; k < x ; k++){
if(x%k==0)
check = false;

}


return check;

}

void asalYazdir(int a){
for(int i = 2; i <= a; i++){
if(myAsal(i) == true)
cout << i << endl;
}
}

void siraAsalyaz(int adet){

for(int i = 2; i <= 2147483647; i++){ // integer type'ýn ulasabilecegi en büyük deðer
if(adet > 0){
if((myAsal(i) == true)){
cout << i << endl;
adet--;}}
}
}




int main(){

asalYazdir(10000);

return 0;

}





< Bu mesaj bu kişi tarafından değiştirildi TheApproachingCurve -- 14 Kasım 2013; 16:20:18 >
Bu mesaja 1 cevap geldi.

Bu mesajda bahsedilenler: @şerlok
Ş
12 yıl
Yüzbaşı

Ellerine sağlık dostum :) Soru 5 i de atlattık.Çok az kaldır arkadaşlar lütfen yardımcı olun

QUESTION 0
* Suppose that you are asked to develop a cell phone
invoice calculator program.
* There are two types of tariffs for users:
* (1) the users that do not use any package are charged
0.15 TL/6 seconds
* (2) the 'eco' package users will pay 19 TL fixed fee for
first 50 minutes and 0.2 TL/6 seconds for extra
talking time that exceeds 50 minutes
* The program will get the total number of talking time
in terms of minutes (double type) and then calculate
and print the total amount that the user will pay for
each tariff type.
* Write the C++ source code of the above
program.
QUESTION 1
Write for and do-while structures
to compute the following products.
1 x (1 / 3) x (1 / 5) x ….x (1 / (n/2))
where n is an integer entered by the
user.
QUESTION 2
Write a C++ program that
gets a positive integer from
the user. The number will be
required until a positive
number is entered.
Find and print the factors of
the entered number.
QUESTION 3
#include<iostream>
int main()
{ int i,j,k,n;
cout << “How many rows?” << endl;
cin >> n;
for(i=n; i>0; i=i - 2)
{
cout << endl;
for(k=(i+1)/2; k>0; --k)
cout << “ “;
for(j=1;j <= i; ++j)
cout << “ &”;
}
}

QUESTION 6
 The value of π can be approximated by using the
following series:
 Write a program that gets the value of n as a
parameter and returns the estimated value of π.
QUESTION 7
 Let n = akak-1ak-2. . .a1a0 be an.
 Find and display the sum of digits of n
(ak + ak-1 + ak-2 + …………… + a1 + a0)
 The number n will be entered by the user
QUESTION 8
 The population of a town A is less than the
population of town B.
 However, the population of town A is growing
faster than the population of town B.
 Write a program that prompts the user to enter
the population and growth rate of each town. The
program outputs after how many years the
population of town A will be greater than or
equal to the population of town B and the
populations of both the towns at that time.

QUESTION 10
 Write a program that gets an integer, say n, by
the user.
 The program than will get positive elements by
the user until 0 is entered.
 When 0 is entered, the program will display the
position of the last occurance of n.


Bu mesaja 2 cevap geldi.

Bu mesajda bahsedilenler: @TheApproachingCurve
M
12 yıl
Yarbay

quote:

Orijinalden alıntı: şerlok

Ellerine sağlık dostum :) Soru 5 i de atlattık.Çok az kaldır arkadaşlar lütfen yardımcı olun

QUESTION 0
* Suppose that you are asked to develop a cell phone
invoice calculator program.
* There are two types of tariffs for users:
* (1) the users that do not use any package are charged
0.15 TL/6 seconds
* (2) the 'eco' package users will pay 19 TL fixed fee for
first 50 minutes and 0.2 TL/6 seconds for extra
talking time that exceeds 50 minutes
* The program will get the total number of talking time
in terms of minutes (double type) and then calculate
and print the total amount that the user will pay for
each tariff type.
* Write the C++ source code of the above
program.
QUESTION 1
Write for and do-while structures
to compute the following products.
1 x (1 / 3) x (1 / 5) x ….x (1 / (n/2))
where n is an integer entered by the
user.
QUESTION 2
Write a C++ program that
gets a positive integer from
the user. The number will be
required until a positive
number is entered.
Find and print the factors of
the entered number.
QUESTION 3
#include<iostream>
int main()
{ int i,j,k,n;
cout << “How many rows?” << endl;
cin >> n;
for(i=n; i>0; i=i - 2)
{
cout << endl;
for(k=(i+1)/2; k>0; --k)
cout << “ “;
for(j=1;j <= i; ++j)
cout << “ &”;
}
}

QUESTION 6
 The value of π can be approximated by using the
following series:
 Write a program that gets the value of n as a
parameter and returns the estimated value of π.
QUESTION 7
 Let n = akak-1ak-2. . .a1a0 be an.
 Find and display the sum of digits of n
(ak + ak-1 + ak-2 + …………… + a1 + a0)
 The number n will be entered by the user
QUESTION 8
 The population of a town A is less than the
population of town B.
 However, the population of town A is growing
faster than the population of town B.
 Write a program that prompts the user to enter
the population and growth rate of each town. The
program outputs after how many years the
population of town A will be greater than or
equal to the population of town B and the
populations of both the towns at that time.

QUESTION 10
 Write a program that gets an integer, say n, by
the user.
 The program than will get positive elements by
the user until 0 is entered.
 When 0 is entered, the program will display the
position of the last occurance of n.

Okuğun okulu da biz okuyalım ?


Bu mesaja 2 cevap geldi.
E
12 yıl
Er

iyi geceler hepinize iki tane soru var yardım edersenız yarın sınavım var sevabına


1-)A[3][4] B[4][5] C=A*B , C=3*5 .. Calculate multiplication of 2 dimentional matries .. Soru bu yardımcı olur musunuz? (C++ ta)



Ş
12 yıl
Yüzbaşı

Dostum yardım etmiyorsan çekil kenara ayak bağı olma lütfen.Neden böyle bir ricada bulunduğumu yazdım


Bu mesaja 1 cevap geldi.

Bu mesajda bahsedilenler: @Muco53
J
12 yıl
Onbaşı

arkadaşlar sorum şu yardımcı olursanız gerçekten çok mutlu olurum
#include <stdio.h>
int main()
{
char ortopedik_engel,cevap;
float otv,kdv,mtv;
int sayac1,sayac2,sayac3,sayac4,sayac5,sayac6,sayac7,sayac8,sayac9,vergisiz_fiyat,motor_hacmi,arac_sira_numarasi;
cevap='e';
arac_sira_numarasi=0;
ortopedik_engel='a';
while(cevap=='e'||cevap=='E')
{
ortopedik_engel='a';
printf("aracin vergisiz fiyatini giriniz\n");
scanf("%d",&vergisiz_fiyat);
printf("motor hacmini giriniz\n");
scanf("%d",&motor_hacmi);
if(motor_hacmi<=1300)
{
while(ortopedik_engel!='e'&& ortopedik_engel!='E'&& ortopedik_engel!='h'&& ortopedik_engel!='H')
{
printf("ortopedik engeliniz varmi?\n e E h H\n");
scanf("%c",&ortopedik_engel);
}
}
}
}
kodunu c dilince çalıştırdığımda program istediğim gibi çalışıyor ama ortopedik engeliniz varmı kısmını iki defa soruyor
aynı yerde karakter alımını getch ile yapınca program takur tukur çalışıyor ama scanf ile aldığımda neden printf kısmını iki kez ekrana yazdırıyor?


Bu mesaja 1 cevap geldi.
-
12 yıl
Binbaşı

arkadaslar merhaba.
asal sayıları nasıl yazdırabılırım? Yeni ögrenmeye basladım c#'ı lütfen temel kodlar ile yazarsanız sevinirim.


Bu mesaja 1 cevap geldi.
M
12 yıl
Yüzbaşı

quote:

Orijinalden alıntı: lahm

arkadaslar merhaba.
asal sayıları nasıl yazdırabılırım? Yeni ögrenmeye basladım c#'ı lütfen temel kodlar ile yazarsanız sevinirim.

https://www.google.com.tr/search?q=c%23+asal+say%C4%B1&oq=c%23+asal+say%C4%B1&aqs=chrome..69i57j69i58j69i60j69i61j69i60j0.2645j0j7&sourceid=chrome&espvd=215&es_sm=122&ie=UTF-8


Bu mesaja 1 cevap geldi.
-
12 yıl
Binbaşı

quote:

Orijinalden alıntı: MrOwl

quote:

Orijinalden alıntı: lahm

arkadaslar merhaba.
asal sayıları nasıl yazdırabılırım? Yeni ögrenmeye basladım c#'ı lütfen temel kodlar ile yazarsanız sevinirim.

https://www.google.com.tr/search?q=c%23+asal+say%C4%B1&oq=c%23+asal+say%C4%B1&aqs=chrome..69i57j69i58j69i60j69i61j69i60j0.2645j0j7&sourceid=chrome&espvd=215&es_sm=122&ie=UTF-8

Sag olasın pcde bakarım



< Bu ileti mobil sürüm kullanılarak atıldı >

T
12 yıl
Yarbay

quote:

Orijinalden alıntı: şerlok

Ellerine sağlık dostum :) Soru 5 i de atlattık.Çok az kaldır arkadaşlar lütfen yardımcı olun

QUESTION 2
Write a C++ program that
gets a positive integer from
the user. The number will be
required until a positive
number is entered.
Find and print the factors of
the entered number.


Bunun cevabi boyle bisey

#include <iostream> 
using namespace std;

int main() {
int input;
int amountOfBits = sizeof(int)*8 - 1;
int maxNegVal = 1 << amountOfBits;
cin >> input;

while ((input & maxNegVal) != 0) {
cin >> input;
}

//this is where the number is positive
cout << "Factors of " << input << " is/are: ";
for(int i=1; i<=input; i++) {
if(input%i==0) {
cout << i << " ";
}
}
return 0;
}