Last active
June 15, 2023 07:19
-
-
Save gokhanyavas/5267053 to your computer and use it in GitHub Desktop.
Çarpma işlemini kullanmadan iki sayının çarpımını bulan c programı
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//çarpma işlemini kullanmadan iki sayının çarpımını bulan program | |
#include <stdio.h> | |
#include <conio.h> | |
int main() | |
{ | |
// while(1) // sonsuz döngü | |
// %g virgülden sonraki sıfırları göstermiyor | |
int a,b,s,i; | |
printf("Lütfen 1.sayıyı giriniz : \n"); | |
scanf("%d",&a); | |
printf("Lütfen 2.sayıyı giriniz : \n"); | |
scanf("%d",&b); | |
s= 0; | |
for (i=1; i<=a; i++ ) | |
s= s+b; | |
printf("%d * %d = %d", a,b,s); | |
getch(); | |
// ekranın kapanmasını engelliyor.. | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Negatif sayıları da dahil ederek yazmış olduğum kod ...
//Çarpma işlemini kullanmadan iki sayının çarpımını bulan c programı.
#include <stdio.h>
#include <conio.h>
#include <locale.h>
int carpim (int a,int b)
{
int sonuc=0,i=0;
}
int main()
{
setlocale(LC_ALL, "Turkish");
}