/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
#include <locale.h>
#include <conio.h>
#include <math.h>
#include <float.h>
int main(void) {
setlocale(LC_ALL,"Turkish");
int tweety=18.80;
int bugsbunny=17.80;
int spiderman=19.20;
int kacmetrekare=0;
float hesap=0;
char tip;
printf("Siparişiniz aldığınız halı tipini girin: \n");
scanf("%c", &tip);
printf("Döşenecek halının metrekaresi: \n");
scanf("%d", &kacmetrekare);
if(tip=='t' || tip=='T'){
hesap=kacmetrekare*tweety;
printf("\nToplam tutar : %f", hesap);
}
else if(tip=='b' || tip=='B'){
hesap=kacmetrekare*bugsbunny;
printf("\nToplam tutar : %f", hesap);
}
else if(tip=='s' || tip=='S'){
hesap=kacmetrekare*spiderman;
printf("\nToplam tutar : %f", hesap);
}
else{
printf("Lütfen geçerli bir tip giriniz.");
}
return 0;
}Çıktısı
Siparişiniz aldığınız halı tipini girin:
s
Döşenecek halının metrekaresi:
4
Toplam tutar : 76.000000
...Program finished with exit code 0
Press ENTER to exit console.

Char kullanmanız gerekiyormuydu bilmiyorum ama, ben bu şekilde yazdım.
#include<stdio.h>
main(){
int tip;
float tweety=18.80, bugsy=17.80, spider=19.20, hesap=0, metrekare;
printf("Hali Tipi Giriniz (1-Tweety/2-BugsBunny/3-Spiderman)");
scanf("%d",&tip);
printf("Hali Metrekare Giriniz:");
scanf("%f",&metrekare);
if(tip==1)
{
hesap=tweety*metrekare;
printf("Odenecek Tutar:%f",hesap);
}
if(tip==2)
{
hesap=bugsy*metrekare;
printf("Odenecek Tutar:%f",hesap);
}
if(tip==3)
{
hesap=spider*metrekare;
printf("Odenecek Tutar:%f",hesap);
}
}
Char ile yapmam gerekiyor evet
Zaman ayırdığınız için çok ama çok teşekkür ediyorum hocam çok sağ olun. Şuan istediğim şekilde çalıştı program